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 :)
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.
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 :)
Totally helpful. Thanks.
Thanks! Just what i needed…
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) …
??????????????
thanks a lot from argentina! absolutly helpful
Thanks a ton! it just solved the problem in a snap.
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
Thanks Charles, I’d spent days trying to find out what to do!
Thanks a ton!!!
I really require this solution….:)
phanks
thanks for the help !
Thanks! :)
For me this meant “install the libssl-dev package then recompile ruby” (or, if you don’t have time, just touch openssl.rb in your pwd)
Cheers old chap.
Thank You so much!
my slom
even four years later it still works …
thx so much :)
—
Ubuntu 10.4
ruby 1.8/1.9
capistrano 2.5.5
For me on Ubuntu 10.10, rvm, ruby 1.8.7, rubygems 1.4.2 for the same openssl error but not for capistrano, I was required to install libssl-dev
Thanks for the hint @roger!