Wed, 27 Jun 2007

Problem with openssl with Ruby 1.8.6 on Ubuntu Fesity 7.04

Posted by Ben Wed, 27 Jun 2007 21:40:00 GMT

Just fixed an issue with openssl not working correctly with Ruby 1.8.6 (installed from source) on Ubuntu Feisty (server).

$ cat /etc/issue
Ubuntu 7.04

After deploying a new Rails application I restarted mongrel but all requests were returning errors (500); the production.log indicated the following issue:

no such file to load -- openssl

To rectify this I had to do the following.

$ sudo apt-get install libopenssl-ruby
$ sudo apt-get install libssl0.9.8

$ cd ~/src/ruby-1.8.6/ext/openssl
$ ruby extconf.rb 
$ make
$ sudo make install

To test that openssl is working correctly use irb:

irb(main):001:0> require 'openssl'
=> true

References

  • http://linuxbrit.co.uk/rbot/ticket/69
  • http://www.ruby-forum.com/topic/90083
Comments

Leave a response

  1. ace about 1 month later:

    Great, that worked!

    Ubuntu 6.06.1 LTS \n \l ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-linux]

    thanks!

  2. todd about 1 month later:

    Great it worked for me too in 1.8.6!

  3. john about 1 month later:

    yup…good solution…and I’m a linux newbie and had no issues. Thanks.

  4. baldur 3 months later:

    That saved me me some pain thanks. I had to add one more thing though:

    checking for openssl/ssl.h… no === Checking for required stuff failed. === Makefile wasn’t created. Fix the errors above.

    it wasn’t finding the right header files so I had to do sudo apt-get install libssl-dev see here http://www.ruby-forum.com/topic/90083

Comments