Someone has run a yum update on the CentOS box (Linux #2 SMP Fri Jan 30 09:55:02 UTC 2009 i686 i686 i386 GNU/Linux) that runs a Ruby on Rails app (Redmine) served with Passenger (Phusion Passenger version 3.0.7). As a result the RoR app stopped working and this is what happens now.

My uderstanding is that the yum update command updated the OpenSSL library, which is now at version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008. I suppose this version is no longer compatible with the version of Ruby installed on the machine (ruby 1.8.5 (2006-08-25) [i386-linux]). Indeed, if I do require 'openssl' inside irb, I get the following:

$ irb
irb(main):001:0> require 'openssl'
TypeError: Cipher is not a class
        from /usr/lib/ruby/site_ruby/1.8/openssl/cipher.rb:22
        from /usr/lib/ruby/site_ruby/1.8/openssl.rb:20:in `require'
        from /usr/lib/ruby/site_ruby/1.8/openssl.rb:20
        from (irb):1:in `require'
        from (irb):1

which is the same error as printed when accessing the application via HTTP.

I suspect that downgrading the OpenSSL version now is a risky business, since the yum update command probably updated other packages (e.g. mod_ssl) that now rely on the new OpenSSL library.

I decided instead to check whether Ruby 1.8.7 would work better with the new OpenSSL version. I downloaded it, built it and make install'ed it such that the Ruby binary resides in /usr/local/bin/ alongside the system's Ruby (1.8.5) which is in /usr/bin/ as usual. Doing a require 'openssl' in irb shows that it indeed works.

Now, my question is as follow: should I remove my own built version of Ruby and rather update the system's Ruby to 1.8.7? Or should I somehow instruct Passenger to use the ruby binary that I built myself (the one in /usr/local/bin/)?

Thanks for your help.

Cheers, Franz

1 Answer 1


The second way is safer than the first. You can do it with rvm:

rvm use 1.8.7
gem install passenger --pre

or PassengerRuby directive:

PassengerRuby /usr/local/bin/ruby

About the first way, try to create symlink first:

mv /usr/bin/ruby /usr/bin/ruby185.bak
ln -s /usr/local/bin/ruby /usr/bin/ruby
  • So, I went the second way. Alongside my own version of Ruby (1.8.7 in /usr/local/bin/), I installed gem and then all the gems required by Redmine (rails, rake, rubygems-update, etc.). This went a long way in reviving my Redmine app, unfortunately I'm now stuck in "gem hell" as I can't seem to find the right combo of gem versions. Right now (for Redmine 1.1.2) I'm using rails 2.3.11, actionmailer 2.3.11, rake 1.1.2 and rubygems-update 1.5.2. This ought to be a supported combo, but I'm invariably getting the following error: undefined method 'name' for "actionmailer":String. Any idea? Oct 14, 2011 at 13:22
  • redmine.org/issues/8325
    – quanta
    Oct 14, 2011 at 13:25
  • Did you do what it said?
    – quanta
    Oct 14, 2011 at 14:25
  • I found part of the culprit: redmine comes with some bits of rails and some gems in the vendor/ directory; after removing the rails bits and changing config/environment.rb to use rails 2.3.12 (I had to update from 2.3.11 to 2.3.12 to fix the actionmailer error) I'm now getting a page of deprecation warnings and the the following error: Missing these required gems: rubytree >= 0 You're running: ruby at /usr/local/bin/ruby rubygems 1.8.10 at /usr/local/lib/ruby/gems/1.8, /root/.gem/ruby/1.8 Run 'rake gems:install' to install the missing gems. Oct 14, 2011 at 14:32
  • Yes, I did. Specifically comment #24 describes well the actions I took and matches my current setup: ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux], gem 1.8.10, rubytree 0.8.1, RAILS_GEM_VERSION = '2.3.12' in config/environment.rb, removed vendor/rails/. But for some reason rubytree (or maybe another package?) is not found. Current status of the app: redmine.appleseedhq.net. Many thanks for your help quanta! Oct 14, 2011 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .