Unable to get RAILS 3 recognize the Ruby 1.9.2 on Ubuntu 10.04

I have fresh install of Ubuntu 10.04.

I have installed Ruby 1.9.2 and RAIL 3 as per this blog http://torqueo.net/installing-ruby-192-and-rails-3-stable-on-ubuntu/.

When I run "ruby -v', I see this;

srikanth@ubuntu:~$ ruby -v ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] srikanth@ubuntu:~$ srikanth@ubuntu:~$ which ruby /usr/local/bin/ruby srikanth@ubuntu:~$

However, RAILS complaints that I am using Ruby 1.9.1. srikanth@ubuntu:~$ rails -v

    Rails 3 doesn't officially support Ruby 1.9.1 since recent stable     releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2     before Rails 3 is released!

    You're running       ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

Rails 3.0.0 srikanth@ubuntu:~$

Even when I try to specify explicity ruby path, "rails' still complains

srikanth@ubuntu:~$ rails -v --ruby=/usr/local/bin/ruby

    Rails 3 doesn't officially support Ruby 1.9.1 since recent stable     releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2     before Rails 3 is released!

    You're running       ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

Rails 3.0.0 srikanth@ubuntu:~$

I tried creating new app, and I get errors related to "Bundler" when launching the app

srikanth@ubuntu:~/rails-workspace/myapp$ rails server /home/srikanth/rails-workspace/myapp/config/boot.rb:9:in `rescue in <top (required)>': uninitialized constant Bundler (NameError)   from /home/srikanth/rails-workspace/myapp/config/boot.rb:5:in `<top (required)>'   from script/rails:5:in `require'   from script/rails:5:in `<main>' srikanth@ubuntu:~/rails-workspace/myapp$

I am not sure how to get RAILS recongnize the fact that I have Ruby 1.9.2 installed.

Any help will be great.

Thanks, Srikanth

What does the shebang inside the rails executable look like ?

Fred

Here it is:

#!/usr/bin/ruby1.9.1

You should install Rails for this copy of Ruby i.e. gem install rails. Check your Ruby version first with ruby -v.

Looks like version 1.9.1 was pre-installed on Ubuntu 10.04 as there was a file /usr/bin/ruby1.9.1 that RAILs seems to have been picking up.

I unintalled Ruby from “System → Adminitstration → Synaptic Package Manager”.

I deleted all the contents of “/usr/local/ruby”.

And re-installed Ruby 1.9.2 and all the RAILS gems as per the blog http://torqueo.net/installing-ruby-192-and-rails-3-stable-on-ubuntu/.

Now, things are working just fine.

You might install rvm as well. I've fund it to be very helpful being able to have multiple - isolated - ruby and rails versions. One of the best features is to have a per project gem setup.

I had problems with ruby on Kubuntu without rvm, now it is smooth sailing