when running a Rails server, I get the following error: no such file to load -- openssl
I try a solution I find online. I go to ~/.rvm/src/ruby-1.9.2-head/ext/openss
rvm pkg install openssl
(older format - rvm package install openssl
)
rvm pkg install iconv
(older format - rvm package install iconv
)
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
Credit to http://www.isnull.com.ar/
You might want to try running ruby-1.9.2-rc2 instead of head? not sure if it will solve this issue or not, but I did have a lot of problems trying to run under head
pretty sure the the command would look like - rvm install 1.9.2-rc2
you will need to re-install rails again
You have to install library for openssl/net/http run the following code and then install openssl and iconv.. Following code will work on UBUNTU..
sudo apt-get install libopenssl-ruby1.9.1
this is for ruby 1.9.1.
sudo apt-get install libopenssl-ruby
for ruby 1.8.x
This error means that your Ruby isn’t compiled with openssl. Assuming that you use RVM, these are the steps to follow to fix this issue.
1.Install the openssl package
rvm pkg install openssl
2.Remove the Ruby installation you’re using
rvm remove 1.9.3
3.And finally recompile Ruby with openssl
rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
4.Everything should be working now. Don’t forget to:
rvm use 1.9.3 --default
I made
rvm pkg install openssl
rvm reinstall 1.9.3
and done!
first check your rvm having the openssl package. Go to /usr/local/src/rvm/ruby-1.9.2-p290/
then go to ext/openssl.
type ruby extconf.rb If we found errors like this
enter code here
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above
Then install apt-get install libssl-dev.Once installed rub ruby extconf.rb.Now the openssl will get installed