capistrano error: no such file to load — openssl (Ruby on Rails)
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
Thanks a bunch :)
Jan Wikholm
May 3, 2007 at 9:39 pm
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
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
Totally helpful. Thanks.
dangerstevens
September 8, 2007 at 5:41 am
Thanks! Just what i needed…
kb
September 18, 2007 at 1:51 am
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
thanks a lot from argentina! absolutly helpful
alfredo
March 10, 2008 at 3:01 pm
Thanks a ton! it just solved the problem in a snap.
Jyothi K
November 1, 2008 at 3:36 am
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
Thanks a ton!!!
I really require this solution….:)
Nimesh
February 6, 2009 at 6:18 am
phanks
almazom
May 29, 2009 at 4:33 pm
thanks for the help !
novhak
June 24, 2009 at 4:25 pm
Thanks! :)
Rowan
September 28, 2009 at 4:14 am