Installing ruby 1.9.1 with ruby 1.8.6 on same Linux machine

Hi
I would like to install ruby1.9.1 with rails 2.3.2. I am currently
using rails 2.2.2 and (also rails 2.3.2 is there in the system) with
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] Could anybody please
suggest a way to do this? My linux distro is fedora

Thanks in advance
Sijo

On Jun 17, 11:08 am, Sijo Kg [email protected] wrote:

Hi
I would like to install ruby1.9.1 with rails 2.3.2. I am currently
using rails 2.2.2 and (also rails 2.3.2 is there in the system) with
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] Could anybody please
suggest a way to do this? My linux distro is fedora

I’ve got both installed on my machine. I built both from source and
when I installed ruby 1.9.1 i passed --sufix=19 to the configure
script (so ruby19 is ruby 1.9.1, gem19 is the ruby 1.9.1 gem
executable etc.). Your distro might have packages for them

Fred

Hi
Thanks for the reply.I am able to install ruby 1.9.1 on another path.
What I need is install a new instance of rails 2.3.2 using the ruby
1.9.1. So that I can work with my old projects on Ruby 1.8.6+rails2.3.2
without conflicting the new Ruby 1.9.1+Rails 2.3.2 setup.

I tried it this way:

1.I installed ruby 1.9.1 on a new path using --prefix.
Then I am able to get the ruby version:
#/path_to_new?ruby/bin/ruby -v
says: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

  1. Then did a gem install like
    #/path_to_ruby1.9.1/bin/gem install rails
    –install-dir=/path_to/new_rails_instance.

Is this the right aproach?
Any way I got this error when I did
#path_to/new_rails_instance/rails -v
gives error
internal:gem_prelude:249:in push_gem_version_on_load_path': undefined method<=>’ for nil:NilClass (NoMethodError)
from internal:gem_prelude:14:in gem' from ./rails:18:in
Where might be the error?

Sijo

Dear Sijo,

Please follow these steps:

  1. Install ruby 1.9.1 (latest patch from ruby site) as you said to a new
    directory using --prefix

  2. then install rails using /path_to_new/ruby/bin/gem install rails
    No need to specify a install path for ‘rails’ it will be install on
    New_ruby_path/bin

  3. /path_to_new/ruby/bin/rails -v .

*note I used ruby 1.9.1p129 (2009-05-12 revision 23412)

I did this way and this worked for me.

Happy coding!
Anoop

Hi
Thanks It is working now
Sijo