I am trying to do 'rake db:migrate' and getting the error message 'no such file to load -- openssl'. Both 'openssl' and 'openssl-devel' packages are installed. Others on Debian or Ubuntu seem to be able to get rid of this by installing 'libopenssl-ruby', which is not available for RedHat. Has anybody run into this and have a solution for it?
Asked
Active
Viewed 1.4k times
12
-
The answer is here: http://www.ruby-forum.com/topic/136893#808492 – catamphetamine Oct 02 '11 at 21:09
5 Answers
13
I had this problem on Ubuntu, after upgrading to 8.10. The solution for Ubuntu was
sudo apt-get install libopenssl-ruby

Joel
- 11,431
- 17
- 62
- 72
10
it seems you need to make the ruby header file
go into the openssl directory and:
ruby extconf.rb
cd ../..
make
make install
See here

gbjbaanb
- 51,617
- 12
- 104
- 148
-
1This answer assumes that you've compiled your own ruby binary. The extconf.rb file is located in the ruby-X.X.X/ext/openssl/ directory. – Steropes Oct 01 '08 at 21:26
-
Worked for me too, needed to install ruby1.8-dev to solve a mkmf? error though (extconf.rb:17:in `require': no such file to load -- mkmf (LoadError)) `sudo apt-get install ruby1.8-dev` – jobwat Jun 03 '11 at 23:21
-
You may need to specify the location of your openssl libraries (as suggested in the linked article). I had to use `ruby extconf.rb --with-openssl-include=/usr/local/ssl/include --with-openssl-lib=/usr/local/ssl/lib` – David Waller Jul 25 '11 at 15:52
8
If you are using RVM to manage your rubies follow the directions here:
0
I had the same issue. I tried going into the openssl folder and running make etc but it couldnt find the libraries lcrypto. I solved the issue by running ruby 1.9.3-p327.
Hope this helps!

VarunMurali
- 413
- 1
- 6
- 17
0
There is probably a gem you are missing. Can you provide the stack trace and the line of code where it originates?
Re-run rake with --trace
to get the stack trace printed.
EDIT: Also what version of Ruby are you running? openssl.rb is in my 1.8.6 install

Otto
- 18,761
- 15
- 56
- 62