solve no such file to load — openssl error

Posted by Dhaval Parikh on Oct 3, 2011 |
Subscribe

Hi all

Was updating one server with rails 2.2.2 to rails 2.3.8. I upgraded ruby from 1.8.6 to 1.8.7 and also rubygems to 1.3.4 version from a source. When i did ruby script/server to start the server I got this error no such file to load — openssl

After a 15 mins R&D i found that this usually happens on an Ubuntu machine (which it was in my case). The solution is as follows

First install libssl using

sudo apt-get install libssl-dev

Than go to the source of ruby and go to the following path

cd ext/openssl

Run the command one after the others.

ruby extconf.rb
make
sudo make install

Now try to do ruby script/server again……and boooooooom! solved.. Even after trying this you are stuck let me know I shall help you out.

Thanks

Tags: , , ,

3 Comments

ken
Jan 17, 2012 at 10:22 am

excellent fix. been recompiling the whole ruby… didn’t know you can just compile that one component and add to ruby.


 
rog_mason
Feb 12, 2012 at 8:45 pm

Sorry for the newbie question. I’m trying to figure out what the path to my ruby source is. I installed ruby 1.9.3 using rvm on Ubuntu 11.10. I can’t figure out where ext/openssl is.


 
Dhaval Parikh
Feb 13, 2012 at 10:42 am

Hi

Its on the source path. i.e the path from where you installed ruby.

Hope this helps.

Thanks


 

Reply

 

Copyright © 2012 Dhaval Parikh All rights reserved. Theme by Laptop Geek.