OpenSSL support for Ruby: "Cipher is not a module (TypeError)"
- by smotchkkiss
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:
TypeError
Application root:
/home/dev/rails/redmine-0.8.7
I've been trying so hard to fix this problem but I can't seem to beat it.
I have tried following this guide:
http://iamclovin.posterous.com/how-to-solve-the-cipher-is-not-a-module-error
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?