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;

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

However, RAILS complaints that I am using Ruby 1.9.1.
[email protected]:~$ 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
[email protected]:~$

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

[email protected]:~$ 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
[email protected]:~$

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

[email protected]:~/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
[email protected]:~/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

On Sep 12, 2:57 pm, Srikanth [email protected] wrote:

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

What does the shebang inside the rails executable look like ?

Fred

Here it is:

#!/usr/bin/ruby1.9.1

On Sun, Sep 12, 2010 at 8:46 PM, Frederick C. <

On 12/09/2010 16:16, Frederick C. wrote:

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

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

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/.http://torqueo.net/installing-ruby-192-and-rails-3-stable-on-ubuntu/

Now, things are working just fine.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs