0

I have a server with RVM installed on it.

Nginx was configured with Passenger to handle ruby 1.9.2 and Rails 3.

I am willing to install a rails 2 application with ruby 1.8.7.

I installed ruby 1.8.7 and install openssl by going to ruby 1.8.7 sources and compiling and installing the .so.

If I start irb and try to require 'openssl' the response if "true"

[root@server:/home/redmine/www/redmine-1.0.4/]#irb              
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> 

But If I try to start for exemple rake gems:install, here is the response.

rake gems:install
(in /home/webapps/redmine-1.0.4)
rake aborted!
no such file to load -- openssl

(See full trace by running task with --trace)
zsh: exit 1     rake gems:install

Is anybody has an idea ?

Thanks !

2 Answers 2

5

I've seen this before. I believe the fix was to:

cd ~/.rvm/src/ruby-1.8.7*/ext/openssl/
ruby extconf.rb
make
make install

If it complains that it needs additional library, you may have to install them. But this should do the trick.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, this worked for me, where other solutions to the same problem didn't. As a side note, I'm using ruby 1.9.2-p0.
1

In addition to what Olives posted, for me that required installing the libssl-dev package. ruby1.8-dev, libruby1.8 and libopenssl-ruby (virtual package) were already installed.

Am on rvm, ubuntu 10.10, ruby1.8.7, gems 1.4.2

Hope this helps someone stuck on ubuntu :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.