OpenSSL, Rails 3 and Ubuntu

I’m using RVM on my Ubuntu box. This way I can nicely install several Ruby and Rails versions next to each other. With Rails 3 however I had a little bit of trouble. When starting the server using

rails server

the server started fine, but as soon as I clicked “About your application’s environment”, I got this error on the console:

LoadError: no such file to load -- openssl

If you’re getting this too the first thing to check is whether these packages are installed:

  • openssl
  • libssl-dev
  • libssl0.9.8

If they are and it anyway doesn’t work you want to go to the source code of your Ruby installation. In my case the source is in this path:

~/.rvm/src/ruby-1.8.7-p249

Now you cd to ext/openssl and run the following commands:

ruby extconf.rb
make
make install

After restarting WEBrick, everything was good:

For a more complete description on how to install Rails 3 on Ubuntu using RVM, checkout this blog post by Rohit Arondekar: Installing Rails 3.0 Beta 3 on Ubuntu using RVM

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
This entry was posted in Linux, RubyOnRails. Bookmark the permalink.

3 Responses to OpenSSL, Rails 3 and Ubuntu

  1. Luke says:


    great, I had this exact same problem. Thank you!

  2. Jorge Luis Guacarán says:


    Excellent, man…!!!
    It worked for me, too…!!!

    Good and clear explanation…!!!

    Thank you very much…!!!

  3. Ozzie says:


    Dude thank you!! I’ve been trying to figure this out since last night. Your problem description and instructions to fix it were simple and not segmented, cluttered, or overly blabbing like many others I’ve been reading. You’ve got a gift for communicating! ;)

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">