Best way to upgrade from 1.8.2 to 1.8.4 on Linux?

J

javachallenge

I have installed from source Ruby in the folder /usr/lib/ruby-1.8.2/.
(I use Linux)
If I do "which ruby" I get /usr/local/bin/ruby. It seems that Ruby has
created the folder /usr/local/bin and filled it with ruby, irb, etc...
I don't mind, this is all fine.

Now my question is: when at XMAS Metz dressed like Santa will bring me
Ruby 1.8.4, how should I upgrade?

I was thinking do to the following:
1) Remove the folder /usr/lib/ruuby-1.8.2/
2) Install Ruby 1.8.4 from source in /usr/lib/ruby-1.8.4/
3) During the Installation of Ruby 1.8.4, it will overwrite
automatically the folder /usr/local/bin/ with the new versions of ruby,
irb, etc... I am not sure if it works automatically in this way. Can
you confirm?
If it doesn't happen out-of-the-box, I was thinking to create a
symbolic link from /usr/local/bin to /usr/lib/ruby-1.8.4/bin/.

Regarding Gem and Rails, I will probably just remove Gem's folder and
reinstall it. And then just reinstall the main gems that I am using
including Rails. The rails websites/application that I have done are
saved elsewhere and shouldn't be affected.

Is it a good approach? How will you do it?
 
E

Eero Saynatkari

unknown said:
I have installed from source Ruby in the folder /usr/lib/ruby-1.8.2/.
(I use Linux)
If I do "which ruby" I get /usr/local/bin/ruby. It seems that Ruby has
created the folder /usr/local/bin and filled it with ruby, irb, etc...
I don't mind, this is all fine.

Now my question is: when at XMAS Metz dressed like Santa will bring me
Ruby 1.8.4, how should I upgrade?

I was thinking do to the following:
1) Remove the folder /usr/lib/ruuby-1.8.2/
2) Install Ruby 1.8.4 from source in /usr/lib/ruby-1.8.4/
3) During the Installation of Ruby 1.8.4, it will overwrite
automatically the folder /usr/local/bin/ with the new versions of ruby,
irb, etc... I am not sure if it works automatically in this way. Can
you confirm?
If it doesn't happen out-of-the-box, I was thinking to create a
symbolic link from /usr/local/bin to /usr/lib/ruby-1.8.4/bin/.

Regarding Gem and Rails, I will probably just remove Gem's folder and
reinstall it. And then just reinstall the main gems that I am using
including Rails. The rails websites/application that I have done are
saved elsewhere and shouldn't be affected.

Is it a good approach? How will you do it?

If you plan on having multiple supported installations,
it is probably best to install both packages with the
--program-suffix option and then symlink the 'real'
binary names to whichever is the default one. This
way you have access to explicit versions if you need
them.

(Remember to install 1.9 too ;)


E
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top