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:

  1. 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

    ReplyDelete
  2. Thanks so much for this. Really helped me out.

    ReplyDelete
  3. thanks! helped me :)

    ReplyDelete
  4. sorted me out too - thanks

    ReplyDelete
  5. Why not 'sudo gem install rubygems-update' ?

    ReplyDelete
  6. Wwwwwonderful. Thank you so much!

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

    ReplyDelete
  8. wonderfull..! its work..!

    Thanks so much for this. Really helped me out.

    ReplyDelete