# Installing ruby 1.9.1 with ruby 1.8.6 on same Linux machine

**URL:** <https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416>\
**Category:** Rails\
**Created:** [June 17, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416 "2009-06-17T12:08:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [June 17, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416/1 "2009-06-17T12:08:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [June 17, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416/2 "2009-06-17T15:11:45Z")

</div>

On Jun 17, 11:08 am, Sijo Kg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [June 18, 2009, 12:06pm UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416/3 "2009-06-18T12:06:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [June 19, 2009, 10:19am UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416/4 "2009-06-19T10:19:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [June 19, 2009, 10:56am UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416/5 "2009-06-19T10:56:35Z")

</div>

Hi  
Thanks It is working now  
Sijo
