solve no such file to load — openssl error

Posted by Dhaval Parikh on Oct 3, 2011 in Uncategorized |

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
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.


Be Sociable, Share!

Tags: , , ,


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.

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


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

Hope this helps.


Apr 14, 2012 at 12:51 am

Thanks worked fine :)

Oct 10, 2012 at 8:44 pm

You can search for the install directory…
sudo find / -name openssl -type d
it’ll list all directories, it’ll be easy to find ext/openssl

mine was in /tmp directory. Ran the commands, and BAM! done deal.

Dec 1, 2012 at 5:20 am

saved me a lot of time!




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