Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup Ubuntu 13.04 Raring Ringtail Discussion

Chris Oliver asked in General
Moustafa Kandeel Moustafa Kandeel

Hi there,

when installing ruby using rbenv, at the step of "rbenv install 2.0.0-p195", it shows the results below:

Downloading ruby-2.0.0-p195.tar.gz...

-> http://ftp.ruby-lang.org/pu...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20130612202212.21299

Results logged to /tmp/ruby-build.20130612202212.21299.log

Last 10 log lines:

/tmp/ruby-build.20130612202212.21299 ~/.rbenv/plugins

checksum mismatch: ruby-2.0.0-p195.tar.gz (file is corrupt)

expected 0672e5af309ae99d1703d0e96eff8ea5, got 9c6ff20645c3da426ade1bceb2e696b9

Reply

Looks like the ruby 2.0 tarball is corrupt. You can try downloading the ruby 2.0 source tar.gz file and saving it to ~/.rbenv/cache like they suggest here: http://stackoverflow.com/qu...

Let me know if that works for you! It could also be curl causing a problem or a network issue.

Reply

Hello and thank you very much for your guide!

I followed all the steps mentioned on my ubuntu 13.04 amd64 laptop.

it seems everything installs correctly, but when I get to "rails -v" to check if rails is installed I get the following:

The program 'rails' can be found in the following packages:
* rails
* ruby-railties-3.2
Try: sudo apt-get install <selected package="">

I have done some research but I am not sure what this is. if you have any suggestion I would appreciate it, and thank you anyway!

Reply

Did you use rbenv? Make sure you run rbenv rehash if you did, this command makes sure that the executables it installs are available to your user.

Reply
Michael Lajlev Michael Lajlev

The "Setting Up PostgreSQL" section contain some typos.

Reply

Thanks Michael! I've updated it to fix the typos (I think!) and improve the instructions a bit.

Reply

Nice site, thanks.

It would be pretty awesome if you would put it on GitHub so we can do a pull requests ;)

ruby-build can be installed in one line like this:

git clone https://github.com/sstephen... ~/.rbenv/plugins/ruby-build

instead of creating and cd-ing into directory

Reply

Thanks, updated that and the ruby instructions to p247!

I think we might open source the site at some point so people can submit changes.

Reply
Zane Fleming Zane Fleming

Had a problem following the "Using rbenv" section. 'rbenv install' didn't work as it wasn't included in the plugins dir being cloned from GitHub to Ubuntu (at least for me).

Might want to add '/ruby-build/' to that command (or as the next line) to ensure that install does work.

Great guide!

Reply

Done, thank you!

Reply
Johny Plaza Johny Plaza

Un excelente tutorial, aunque deberias mencionar que hay que crear las base de datos, o bueno no se si ahora es necesario crearlas y configurarlas myapp_test; myapp_production; myapp_development ya sea para mysql o psql......
En definitiva gracias por el tutorial excelente aporte para las personas que estamos comenzando en este mundo de rails

Reply

When I try to run: "cat ~/.ssh/rsakp01.pub" I receive a no such file or directory error. I checked that the file is in the specified folder...

Reply

Weird. Make sure you run "ls ~/.ssh/" to make sure. I'm sure it's just something simple. :)

Reply
Dave Patton Dave Patton

These steps worked great for me in Xubuntu 13.04. Thanks!

Reply
Talbert Houle Talbert Houle

Following the instructions to a "T" ended with me getting Rails 4.0. Not sure, but I have had a heck of a time getting either Postgres or MySQL apps running. I am in an endless loop of errors after starting the rails server and visiting the localhost:3000 site.

Does Rails 4 have a different setup for MySQL than what is above?

Reply

I know the feeling. :) So if you go with MySQL, you need to update your database.yml to use the "mysql2" adapter and install the "mysql2" gem with your Gemfile. By default it's going to use sqlite3. You should be able to run fine with sqlite3 so it shouldn't be having any errors. Does your log/development.log file contain any info that might help debug what's wrong?

Reply
FredInDshell FredInDshell

I followed the steps but when i run ruby file in geany or scite editors in linux it does not run. Error message like ruby not found. It will run if i use the terminal to run the ruby file. help please?

Reply

I think it's likely that the editors are looking for the Ruby executables. rbenv and rvm both install hooks into the shell so that you can switch between active Ruby versions. The editors most likely don't execute your shell configuration so it doesn't find them. My suggestion in this case is to choose the version of Ruby you're planning on using and find their binary inside either the .rbenv or .rvm folders inside your home directory. That way it can find the executable directly without having to jump through one of the managers.

Reply
FredInDshell FredInDshell

no need to answer figured out the solution. :)

i just need to put in my script in the build in external tool of gedit:

#!/bin/sh
export PATH="$HOME/.rbenv/bin:$PATH"
ruby

Reply

Hi,
Thanks for one of the most straightforward, current, simple and complete guides. Just one thing as it seems rails has moved to 4.0.0 is that I had to install bundler and update. Now "rake server" is working with Rails 4.0.0 and mysql2:

gem install bundler && bundle update

I encourage you to update your guide for 4.0.0 :-)
Thanks again,
Al

Reply

Thanks Al! I'll be updating the tutorial shortly. I think I wrote it when Rails 4.0 wasn't out yet but hadn't updated it since.

Reply

rbenv install 2.0.0-p247

Downloading ruby-2.0.0-p247.tar.gz...

-> ftp://ftp.ruby-lang.org/pub...

Installing ruby-2.0.0-p247...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20130814225651.28393

Results logged to /tmp/ruby-build.20130814225651.28393.log

Last 10 log lines:

installing default gems: /home/piavgh/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)

bigdecimal 1.2.0

io-console 0.4.2

json 1.7.7

minitest 4.3.2

psych 2.0.0

rake 0.9.6

rdoc 4.0.0

test-unit 2.0.0.0

The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

After "rbenv install 2.0.0-p247" I get this. Did I miss something?

Reply

It sounds like you're missing the openssl lib and that's causing it to fail. Can you check to make sure you have libssl-dev installed?

Reply
Sajeev Zacharias Sajeev Zacharias

Thanks so much. I was using rvm usually. But rbenv is excellent. no errors. Mine is a chinese laptop worth only 160 euros including shipping. I am using ubuntu 12.04 lts. My earlier trials for instling rails 4 and ruby 2 ended up unsuccessfully. Next I need to install rspec. Last month it created a problem with these new versions of ruby and rails. hope it ends in success.

Reply

Thanks for this guide. I followed step by step and chose MySQL install instead of PostgreSQL

Visiting http://localhost:3000 gives me the following error:

Access denied for user 'root'@'localhost' (using password: NO)
Rails.root: /home/guest/myapp

Reply

That's saying that your database connection to the database isn't working. You may have specified a password when you installed MySQL or a different username than root. Update your database.yml to specify the database, make sure you have the mysql2 or pg gem installed in the Gemfile, and you'll be good to go.

Reply

Is Rails ok to use MariaDB instead of MySQL?

Reply

I think you can pretty much follow the MySQL instructions and it is a seamless replacement. Try following those and you should be good.

Reply
Kunal Krishna Kunal Krishna

why does using "curl -L https://get.rvm.io | bash -s stable"
throws error "curl: (56) Received HTTP code 407 from proxy after CONNECT"
Note: I correctly set proxy address, username and password from terminal and was able to successfully update using "sudo apt-get update" thereby ensuring my internet working.

Reply

Sounds like curl isn't able to authenticate with your proxy. You might just try adding the proxy credentials into the curl command. You can run man curl in terminal to get the docs on it.

Reply

Chris, it's rare to find instructions that are brief but functional and easy to follow--great job. I was up and running in less than 30 minutes. If only I could learn Ruby and Rails that quickly! As a long time Java developer, I'll have a lot of adjustments to make. Thanks so much for helping me get started with a frustration-free installation.

Reply

Thanks for the kind words Nes! I've been planning how we're going to do the Rails content with the same sort of clarity and we will definitely be taking you along step by step. Hop on the mailing list and I'll be sure to let you know when they are out. :)

Reply
Surya Zi Kencana Surya Zi Kencana

Cloning https://github.com/ruby/rub......

Installing ruby-2.1.0-dev...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20130909154456.11617

Results logged to /tmp/ruby-build.20130909154456.11617.log

Last 10 log lines:

/tmp/ruby-build.20130909154456.11617 ~

Cloning into 'ruby-2.1.0-dev'...

/tmp/ruby-build.20130909154456.11617/ruby-2.1.0-dev /tmp/ruby-build.20130909154456.11617 ~

/home/surya/.rbenv/plugins/ruby-build/bin/ruby-build: line 393: autoconf: command not found

why was it ??

Reply

You're missing the autoconf package. Just run sudo apt-get install autoconf and it should work if you try again.

Reply

Great tutorial - working setup on xubuntu 13.04 with postgres, couple of points I needed to change

after creating user i couldn't create a database, needed to login into psql and

alter user chris with superuser

also the line
rails new myapp -d postgres

should be
rails new myapp -d postgresql

Reply

Thanks for the notes! I'll update the tut.

Reply

One thing I'm not going to post is any of the problems I had getting this installed, even though there were one or two minor issues that cropped up that require a little Google "intuition". What I am going to say is that this post made my life so very, very, very much easier getting up and running. And for that you have my thanks and plenty of it.

Reply

Good to hear, and let me know via email if you have anything that should be changed.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.