Installing OpenSSL Support for Ruby on Ubuntu

The more I work with Ubuntu, the more I think it’s a very good desktop, but not a good development machine. For instance, you can install Ruby 1.8.4 from the package management system, but not 1.8.5 (or 1.8.6 which is now the latest). So you’re stuck compiling ruby on your own.

Usually that’s not too big of a deal. However, for some reason, the default way of compiling Ruby from source on Ubuntu leaves out the installation of OpenSSL support. I had the development openssl libraries package installed, so that wasn’t it. I didn’t see any errors in the configure process or during compilation.

Turns out, to get OpenSSL to compile and install with Ruby on Ubuntu, you need to follow these steps *after you’ve installed ruby*:

cd ruby_src_dir/ext/openssl
ruby extconf.rb
make
make install

Success!

That seems a bit harder than it should be, huh?

6 Responses to “Installing OpenSSL Support for Ruby on Ubuntu”

  1. Keith Alexander Says:

    What would be a better distro for (web) development? I’ve tried gentoo in the past, which is probably good for getting all the latest versions, but I don’t have the time or patience to install it again.

  2. carmen Says:

    a big fan of paludis myself. its a replacement for gentoo’s portage, but otherwise is compatible with all the popular repositories out there, such as gentoo itself plus all the developer and domain-specific oriented ones..

  3. Jeff Says:

    fyi after ruby extconf.rb

    I needed to touch one of the .o files before make would do anything. It worked after that.

  4. Francis Fish Says:

    I also had a problem with the readline library being missing so irb wouldn’t work. I couldn’t get it to compile using these instructions. Ripped the shared library from an ubuntu machine that was working.

  5. Francis Fish Says:

    sorry … the file is:

    site_ruby/1.8/i686-linux/readline.so

  6. techblog » Blog Archive » compiling ruby with ssl support Says:

    […] found a post that said that openssl wasn’t included in ubuntu by default and it could be installed […]

Leave a Reply