All threads / Setup Ubuntu 13.04 Raring Ringtail Discussion
Ask A Question


You’re not receiving notifications from this thread.

Setup Ubuntu 13.04 Raring Ringtail Discussion

Chris Oliver asked in General
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...



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

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:

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

Moustafa Kandeel ·

Thanks Chris, but as I am new to setting up environments on linux, I couldn't figure out what to do to install ruby 2 from source. I installed ruby 1.9.3 as I will continue with the tutorial at : http://ruby.railstutorial.o...

Thanks for help! :)

Sure thing, you'll do just fine with Ruby 1.9.3. :)

Thanks! :)

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!

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.

Thank you Chris for the super fast reply!
for some reason I had to set again

rvm use 1.9.3 --default
and repeat the other steps.
I am not sure why.

It all works now!
Thank you.

Ah ok! Glad you got it working! :)

Michael Lajlev ·

The "Setting Up PostgreSQL" section contain some typos.

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

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 ~/.rbenv/plugins/ruby-build

instead of creating and cd-ing into directory

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.

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!

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

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

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

Dave Patton ·

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

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?

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?

Talbert Houle ·

Chris, thank you for the quick reply.

I'll have some time tonight to take a look and ensure all settings in yml file and gemfile are correct. I'll also dig into the log files to see if I find anything in there too.

Talbert Houle ·

Hey Chris...sorry about the late reply, but I was able to get everything going after changing from Rails 4 to Rails 3. Go figure. :)

This is pretty exciting because I'm working on my first application of any kind since college. Forgot how much I liked programming. Your post on multiple databases and migrations is helping me through my next little road bump.

Keep up the great work with this site and excid3!

That's fantastic to hear! :) Programming really is a blast and I'm glad you got Rails 3 going. You'll be able to upgrade it later on fairly easily anyways. Good luck with everything and let me know if you have any more questions!

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?

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.

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:

export PATH="$HOME/.rbenv/bin:$PATH"

Fantastic! I'll update the tutorial to include this in the near future.

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,

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.

Hoang Trinh ·

rbenv install 2.0.0-p247

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


Installing ruby-2.0.0-p247...


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


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?

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?

Hoang Trinh ·

Thank you for quickly reply. I fixed it :D

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.

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

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.

Day one learning for me so appreciate your quick response Chris.

When I configured MySQL, I did set a password but with the default username. Was the database.yml suppose to include this information automatically or do I have to go back into it and insert the password.

No, actually you have to set it up. That's sort of where my tutorial leaves off I guess.

Add gem "mysql2" to your gemfile, change the adapter in database.yml to adapter: "mysql2" and add a password line that has the database password. Run bundle install and restart your Rails app and you should be good to go!

You may also need to run rake db:create to have Rails create the database for you.

I did a complete reinstall of Ubuntu and went through the entire process again but this time without the mysql password. When I go to http://localhost:3000 I see Welcome aboard You’re riding Ruby on Rails!

Thanks Chris for the guide!!

Is Rails ok to use MariaDB instead of MySQL?

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

Kunal Krishna ·

why does using "curl -L | 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.

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.

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.

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. :)

Surya Zi Kencana ·


Installing ruby-2.1.0-dev...


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 ??

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

Craig McGuff ·

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

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

Matthew Fritz ·

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.

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

Gabriele Cinti ·

this method works great (thank you very much!!! i needed it to compile my university's thesis!), but i have a little problem:
when i go to type "gem install rails", the system give me this output:
"Succesfully installed rails-4.0.0
1 gem installed"
and it's ok
and then, when i check the version with "rails -v":

"Rails 2.3.14"

how can i resolve this?

Make sure you haven't installed Rails from another method. It seems as if you've got two copies of Rails installed.

Gabriele Cinti ·

i reinstalled ruby and rails, and now works fine ;)
rails -v --> Rails 4.0.0
and http://localhost:3000 works too
Thx for support ;)

Rashedun Naby Sangeet ·

I've just removed RoR from my Ubuntu 13.04 for installing update version of RoR. But how can I be sure that its completely removed?

Rashedun Naby Sangeet ·

When i'm trying to setup my ubuntu 13.04 gives me this !!! what should I do?

"Downloaded archive checksum did not match, archive was removed!

If you wish to continue with not matching download add '--verify-downloads 2' after the command.

There has been an error fetching the ruby interpreter. Halting the installation."

Josiah Allen ·

This page has been a great help with getting rails installed. Much appreciated!!

If you install the Ruby-Tk?

First of all it is a great tutorial brother i just want to confirm that after installing rails when i check rails version it shows 2.3.14 i try to re install rails it shows that "successfully installed rails 4.0.0" but again the version is 2.3.14. I am new to rails so please help me how to sort out this problem.

If you used rbenv, you'll need to run "rbenv rehash" to get it to see the new version of Rails.

Bernard Loken ·

Listen!!!! I have been work for three plus years supporting a Rails server and application and your instruction were bang on!. I knew where the typos were, and made the required changes. I could not have asked for a better set of instructions.

Thanks a million

Thank you. It's very helpful for me.

Maryam Younesi ·

I'm using rbnev,
At the step of: "$gem install rails", i get this type of error: "Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (".

Maryam, that sounds like an internet connection problem. You might try visiting and making sure you don't have any trouble with that.

Giuseppe Cardenas ·

By the way, if you're using this guide to set up a dev environment on a version other than 13.04 or 14.04 (I was using 10.04) be careful not to add this repository:

sudo sh -c "echo 'deb precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

when installing PostgreSQL 9.3. It will break your packages since it installs libs from Ubuntu Precise on your 10.04 installation. In this case I had to purge the installed packages and do a "sudo apt-get update && sudo apt-get dist-upgrade" to resync my packages to the correct version. Besides that, the rest of the guide works pretty good on 10.04.

MartinBark ·

Great post! Thanks for sharing

Ruby on Rails Developer in india

AshleyBates ·

I found this article very informative,it is very helpful for getting rails installed.

Thanks for sharing.

Ruby on Rails Developer in india

Join the discussion

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

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

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

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.