When I try to create a new project($ rails new first_app) it gives following error after creating directory structure.
...
...
create vendor/plugins/.gitkeep
run bundle install
/home/amit/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- openssl (LoadError)
from /home/amit/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/amit/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
...
...
Here is the configuration on Ubuntu 10.04
$ rails -v
Rails 3.2.1
$ rvm -v
rvm 1.10.2 by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.beginrescueend.com/]
$ bundle -v
Bundler version 1.0.21
$ gem -v
1.8.15
Please help me to resolve this issue.
You need to bundle your ruby with openssl support. Have a look at http://beginrescueend.com/packages/openssl/
rvm reinstall 1.9.3 --with-openssl-dir=/usr/local
This requires that you have the openssl headers present on your box. These are named differently across the systems, like libopenssl-dev
, libssl-dev
, openssl-devel
etc..
Had the same problem on Ubuntu Lucid (10.04). Fixed with:
sudo apt-get install libssl-dev
rvm remove 1.9.3
rvm install 1.9.3
This solution I saw in this link worked for me very well.
Assuming RVM is in use
rvm pkg install openssl
Remove ruby
rvm remove 1.9.3
And finally recompile Ruby with openssl
rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
Finally
rvm use 1.9.3 --default
I hope this worked for future searches.
If you're not using RVM, here's how:
sudo apt-get install libssl-dev
./configure --prefix=/usr/local
make
make install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With