It needs more code

Kitchen Sink Included

capistrano error: no such file to load — openssl (Ruby on Rails)

with 14 comments

While setting up capistrano as suggested in Agile Development with Rails (2nd edition), you may run into the following error:
no such file to load — openssl

The full context of the error is below:

$ rake remote:setup
(in [deployment directory])
Capistrano/Rake integration is deprecated.
Please invoke the ‘cap’ command directly: `cap setup’
* executing task setup
* executing “mkdir -p -m 775 [deployment directory] [deployment directory]/releases [deployment directory]/shared [deployment directory]/shared/system &&\n mkdir -p -m 777 [deployment directory]shared/log &&\n mkdir -p -m 777 [deployment directory]/shared/pids”
servers: ["hostname"]
rake aborted!
no such file to load — openssl

On Ubuntu 6.06 (LTS) this means that the openssl ruby interface is missing, and that it needs to be installed:

$ sudo apt-get install libopenssl-ruby1.8

From the apt-cache description: libopenssl-ruby1.8 – OpenSSL interface for Ruby 1.8

Written by cake

January 16, 2007 at 7:13 am

Posted in RoR

14 Responses

Subscribe to comments with RSS.

  1. Thanks a bunch :)

    Jan Wikholm

    May 3, 2007 at 9:39 pm

  2. Thanks for the post. Only thing that took me a little while to get was that I didn’t have universe repositories enabled. Once I figured that out this fixed the error.

    Matt Robinson

    May 8, 2007 at 2:28 am

  3. The same error occurred when I was trying to run rake test for actionpack (I was about to submit a doc patch for Rails source code).

    Thanks :)

    mikong

    July 6, 2007 at 4:45 am

  4. Totally helpful. Thanks.

    dangerstevens

    September 8, 2007 at 5:41 am

  5. Thanks! Just what i needed…

    kb

    September 18, 2007 at 1:51 am

  6. the same error occured when i run rake db:migrate.
    no such file to load — openssl

    i just install libopenssl before:
    Install these packages without verification [y/N]? y
    Get:1 http://192.168.0.3 gutsy/ libopenssl-ruby1.8 1.8.6.36-1ubuntu3 [316kB]
    Fetched 316kB in 0s (1475kB/s)
    Selecting previously deselected package libopenssl-ruby1.8.
    (Reading database … 125102 files and directories currently installed.)
    Unpacking libopenssl-ruby1.8 (from …/libopenssl-ruby1.8_1.8.6.36-1ubuntu3_i386.deb) …
    Setting up libopenssl-ruby1.8 (1.8.6.36-1ubuntu3) …

    ??????????????

    geboi

    December 18, 2007 at 8:36 am

  7. thanks a lot from argentina! absolutly helpful

    alfredo

    March 10, 2008 at 3:01 pm

  8. Thanks a ton! it just solved the problem in a snap.

    Jyothi K

    November 1, 2008 at 3:36 am

  9. Hello
    I had the same problem, but I was using CentOS. I installed ruby from scratch, not from a repository. After googling a while I found that extensions must be compiled one by one. In my case, I had to compile openssl and zlib. Steps:
    1. Go to $RUBY_INSTALLER_DIR/ext/
    2. Type “ruby extconf.rb”
    3. make & make install

    Charles

    December 4, 2008 at 8:18 pm

    • Thanks Charles, I’d spent days trying to find out what to do!

      JJ

      October 25, 2009 at 10:31 am

  10. Thanks a ton!!!

    I really require this solution….:)

    Nimesh

    February 6, 2009 at 6:18 am

  11. phanks

    almazom

    May 29, 2009 at 4:33 pm

  12. thanks for the help !

    novhak

    June 24, 2009 at 4:25 pm

  13. Thanks! :)

    Rowan

    September 28, 2009 at 4:14 am


Leave a Reply