Topic: Upgrading Ruby Enterprise Edition

Topic type:

Step by step guide for upgrading REE quickly and painlessly.

Eventually security exploits or bug fixes are made which are a good thing to have in place. And as these fixes are tested, they get ported to each operating system and installed via system update. In the case of Ruby Enterprise Edition (REE), updates have to be done manually when a new release becomes available. But thankfully, doing so is relatively painless.

Download and Install

First step is to download and install the latest version of REE, which you can grab at:

http://www.rubyenterpriseedition.com/download.html

Follow the instructions on that page, keeping the default settings.

Getting Gem List

As you'll see later on, you'll need a list of you installed gems. To get this, simply run

$ gem list

and copy the output to a file and save it. We'll use this later.

Updating PATHs

When you installed REE (see the install guides), you had to add the path to REE into both the root and kete (if you're using a kete account) user accounts. Because it already exists, we dont need to add, but simply replace the details of where it points to. So take note of the full version string of REE you're upgrading to (looks like "1.8.6-20080810", and open up (using Vim or a text editor as root) /root/.bashrc  and /home/kete/.bash_profile,  and edit the version string to match the one you're installing. Save the files, close the console, then reopen and test as both root and kete that "which ruby" points to the newest version you're upgrading to.

Installing Gems

Every installation of REE comes with it's own gem repositories, So what you'll need to do is install all of your previous gems again. The file you saved earlier will help with this. For each one (except in the case of 6 default rails gems (action*, active*)), add the name to the end of a "gem install" command, like so:

root@host: # gem install chronic zoom rails mime-types ... ...

In the specific case of Kete, libxml-ruby needs to have a specific version installed. You can install those versions like so:

root@host: # gem install libxml-ruby --version=0.7.0

Make sure passenger gem is installed again before continuing on.

Installing mod_rails/Passenger

We now have to install mod_rails/Passenger. The gem should be installed by now, so you should be able to install by running

root@host: # passenger-install-apache2-module

When its finished, copy the 3 lines at the end of the install (Apache2 configuration lines), open up /etc/apache2/apache2.conf, and at the bottom, replace the old three passenger lines with the new lines.

And thats all thats needed.

Fininishing up

The last things you need to do are restart Apache2 by running

root@host: # /etc/init.d/apache2 restart

(optional) remove the old REE installation, since its no longer used

and restart backgroundrb for each site being hosted.

And you're done.

Discuss This Topic

There are 0 comments in this discussion.

join this discussion

Creative Commons Attribution-Share Alike 3.0 New Zealand License
Upgrading Ruby Enterprise Edition by Kieran P is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License