Monday, August 30, 2010

Rails 3 on Ubuntu 9.10

I had installed ruby gems (rubygems) using the apt package management system, which is the recommended way, but ran into a problem when I wanted to install rails 3:

Error installing rails:
    i18n requires RubyGems version >= 1.3.6

 
The solution was to install the latest version of gems from its source:

wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar xvfz rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb 


Now it works like a charm:

sudo gem install rails

rails new testapp

That's it for today. Thanks for stopping by.

PS: Instead of using the system wide ruby gems (like I just showed you) you can also use the RVM (Ruby Version Manager), which lets you use different versions of ruby and gems for each ruby/rails project.

10 comments:

Anonymous said...

man, you are my hero. I just wasted about an hour because activeresource would not install because of the same problem. then stumbled over this post and about 1 minute later it installs like a charm :D

Anonymous said...

Thanks so much for this. Really helped me out.

Anonymous said...

thank you sir

Anonymous said...

thanks! helped me :)

Anonymous said...

sorted me out too - thanks

Anonymous said...

Why not 'sudo gem install rubygems-update' ?

Anonymous said...

Thank you!

Selah said...

Wwwwwonderful. Thank you so much!

David Ryder said...

THANK YOU! I may have figured this out eventually but this saved me a lot of time. And very well written. Wooooot!

omagus said...

wonderfull..! its work..!

Thanks so much for this. Really helped me out.