OpenSSL uninitialized constant (NameError)

I am developing an application to decrypt data files using OpenSSL, but this does not work when deploying a server at our stage. Is there any configuration step that should include OpenSSL that I skipped on the server? I did not do anything special to make it work locally (development on windows).

The line that causes the error is:

rescue_from OpenSSL::Cipher::CipherError, :with => :cipher_error 

in one of my controllers.

Ruby 1.8.7, Rails 3.0.4 To add support for OpenSSL, stones were not used, they just worked locally.

Actual file decryption works fine (the code is in the module in /lib ), it's just this line in the controller that fails.

+8
ruby-on-rails ruby-on-rails-3 openssl
source share
1 answer

You can try explicitly specifying openssl

 require 'openssl' 

Have you installed ruby โ€‹โ€‹1.8.7 with rvm?

If so, you can take a look at this link: http://jronallo.imtqy.com/blog/ruby-and-rails-using-rvm-on-a-fresh-and-updated-ubuntu-11-dot-10 -install

Perhaps a related SO question: Rails 3 - there is no such file to download - openssl

+18
source share

All Articles