Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Problem

Our systems admin needed to upgrade the packages on our CentOS 5.4 dev server to match the packages on our production server. The upgrade affected ruby and/or openssl.

We run a Ruby on Rails issue tracking system called Redmine that is deployed with Passenger on Apache. Everything worked before the server update, but when trying to access the ticket system now, I get the following error:

Error message:

Cipher is not a module

Exception class:


Application root:


I've been trying so hard to fix this problem but I can't seem to beat it.

I have tried following this guide:

When I try require 'openssl' in IRB, I do see a true return value. However, I'm still seeing the Cipher.rb is not a module TypeError when accessing the ticket system.

Possibly (probably) related:

I've tried updating Passenger, but when I try passenger-install-apache2-module I see:

Checking for required software...

* GNU C++ compiler... found at /usr/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... /usr/lib/ruby/1.8/openssl/cipher.rb:22: Cipher is not a module (TypeError)

Any help?

share|improve this question
up vote 2 down vote accepted

ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]

in ruby source directory

cd ext/openssl/
ruby extconf.rb 
sudo make install
sudo cp -R /usr/local/lib/ruby/site_ruby/1.8/openssl* /usr/lib/ruby/1.8/

Finding a fix for this took a very long time...

share|improve this answer
Thanks a lot! Just having the same, had to compile my ruby myself, what fedora has is 1.8.6 – user58659 Oct 29 '10 at 14:57
An additional comment that if the above does not fix the issue then look at the bang header (first line) on your ruby scripts. On Ubuntu most system-wide ruby scripts run with ruby1.8!! If you manually installed ruby 1.8.7 then it will not overwrite ruby1.8, and you'll have your old scripts still running your old ruby version even if you just installed 1.8.7, and you'll still be getting the openssl error. The fix is to link ruby1.8 -> ruby, or change the bang header of your ruby scripts to run the correct ruby (/usr/bin/ruby). – Casper Jul 7 '11 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.