no such file to load -- net/https

on 2011/10/15 - -

When I started using heroku, I got some errors and solved them by installing ext modules.

Installing libopenssl-ruby package by apt-get was one of the solutions, but I couldn't use that package because there was no available package for my ruby, version 1.9.

The error is:


# gem install heroku
# ...(installing)
# heroku
/usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient.rb:9:in `rescue in ': no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
 from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient.rb:5:in `'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/rest_client.rb:2:in `'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.9.0/lib/heroku/client.rb:2:in `'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.9.0/lib/heroku.rb:6:in `'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.9.0/bin/heroku:6:in `'
 from /usr/local/bin/heroku:19:in `load'
 from /usr/local/bin/heroku:19:in `
' # (omg)



How I solved:

I installed two ext modules to my ruby - openssl and readline.
# I also installed libssl-dev before installing openssl because ssl.h was needed to install openssl.


# apt-get install libssl-dev
# cd /usr/local/src/ruby-1.9.2-p290/ext/openssl/
# ruby extconf.rb 
# make
# make install
# cd ../readline
# ruby extconf.rb 
# make 
# make install



All done.

No comments :