views:

518

answers:

6

I'm setting up a new RedHat Enterprise Linux 5 system to host Ruby apps running under Apache with Phusion Passenger. I've updated all the local packages on the system. Here is what RedHat is giving me for Ruby:

$ ruby -v
ruby 1.8.5 (2006-08-25) [i386-linux]

That's pretty old. Is it better to use what RedHat provides or install a newer version?

If newer version, which one? I've always gone with the latest in the 1.8.x series. Any reason to do differently?


UPDATE

After pondering and drawing a chart of the pros and cons, I decided to give Ruby Enterprise Edition a try. If that turns out to be problematic, I'll probably switch to 1.8.7.

+1  A: 

I'd suggest upgrading to Ruby 1.8.7. It's the recommended version for use with Ruby on Rails.

Evan Meagher
A: 

As with any framework/platform, you probably want to keep using the version that you know your app works perfectly on. In the case of Rails, the recommended version is 1.8.7, so you'll probably want to use that.

But, then also, Why not just use the latest Stable Version when building a completely new app? The latest stable version usual contains more bug fixes than other previous releases, and may be the better choice.

Chris Pietschmann
+2  A: 

I would definitely upgrade to the latest 1.8.7, or 1.9.1, it shouldn't pose any problem. 1.9.1 uses a new VM which runs much faster, but some gems aren't compatible yet with 1.9, even though it's now considered the 'stable' release.

cloudhead
A: 

At least upgrade to patchlevel 230 to get rid of the security vulnerability

nasmorn
+2  A: 

If you decide to go the route of building and running a different version of Ruby, just remember that you will need to also maintain that version yourself. If there are security issues (or bugfixes), you will need to ensure that you patch or upgrade your Ruby installation reasonably quickly. It may be the case that bug and security fixes won't be available for the version of Ruby that you install, meaning that you will need to move to a later version, possibly causing compatibility issues if there are API or functionality changes (in other words, everything will need to be re-tested).

Most software that comes with the base RHEL will be maintained at that version for the life of RHEL. That means you probably won't have the latest and greatest. But, it does mean that if there are security issues or major bugs, Red Hat will most likely backport the fixes to the version that came with the OS. You will still always want to re-test everything, but the chances of anything breaking are greatly reduced.

Adam Batkin
+1  A: 

If you're running Passenger, it works well with Ruby Enterprise Edition, consuming significantly less memory. The installer will walk you through re-configuring Passenger to work with RubyEE as well.

Terry