no such file to load -- capistrano/cli (LoadError)

2,544 views
Skip to first unread message

lamp5matt

unread,
Mar 10, 2009, 11:13:31 AM3/10/09
to Capistrano
I found another thread here where someone got this error and solved it
more or less by reinstalling everything, and by adding capistrano-ext
to support multistage deployment.

I am *not using multistage deployment, and have reinstalled
everything, and still get this error.

Can someone explain what the problem is exactly? Ruby's $LOAD_PATH is
/usr/local/lib/site_ruby/1.8
/usr/local/lib/site_ruby/1.8/powerpc-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.8
/usr/lib/ruby/vendor_ruby/1.8/powerpc-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.8
/usr/lib/ruby/1.8/powerpc-linux

do I need to symlink capistrano, or /var/lib/gems/1.8 ?

This, incidentally, is capistrano 2.5.5; I've used 2.4.0 for a long
time with no problems, and it's bin/cap doesn't require 'capistrano/
cli' but rubygems installed 2.5.5 on this machine, which is new
(Debian)

Jamis Buck

unread,
Mar 10, 2009, 11:16:22 AM3/10/09
to capis...@googlegroups.com
The install is definitely broken. capistrano/cli.rb is one of the
standard files for capistrano. Try uninstalling all installed versions
of capistrano and reinstalling it.

- Jamis

Jonathan Weiss

unread,
Mar 10, 2009, 11:18:17 AM3/10/09
to capis...@googlegroups.com
This sounds like a permission problem. Check that all files of the gem
are world-readable.

Jonathan

--
Jonathan Weiss
http://blog.innerewut.de
http://twitter.com/jweiss

lamp5matt

unread,
Mar 10, 2009, 11:26:19 AM3/10/09
to Capistrano
I have now reinstalled capistrano 3 times.
and
chmod -R o+r /var/lib/gems/1.8/gems/

No improvement.

lamp5matt

unread,
Mar 10, 2009, 11:31:42 AM3/10/09
to Capistrano

On Mar 10, 9:16 am, Jamis Buck <ja...@37signals.com> wrote:
> capistrano/cli.rb is one of the
> standard files for capistrano.

yes, it's here

>find /var/lib/gems/ -name cli.rb
/var/lib/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/cli.rb

but
>/var/lib/gems/1.8/gems/capistrano-2.5.5/bin/cap connect
/var/lib/gems/1.8/gems/capistrano-2.5.5/bin/cap:3:in `require': no
such file to load -- capistrano/cli (LoadError)

"cap" is not in my $PATH, so I used the full path. When I symlinked

>ln -s /var/lib/gems/1.8/gems/capistrano-2.5.5/bin/cap /usr/local/bin/cap

then
>cap connect
/usr/local/bin/cap:3:in `require': no such file to load -- capistrano/
cli (LoadError)
from /usr/local/bin/cap:3

Jamis Buck

unread,
Mar 10, 2009, 11:44:29 AM3/10/09
to capis...@googlegroups.com
Sounds like rubygems might not be loading. Try:

export RUBYOPT=rubygems

and see if that helps. (That will cause rubygems to be loaded
automatically by Ruby.)

- Jamis

lamp5matt

unread,
Mar 10, 2009, 12:28:07 PM3/10/09
to Capistrano
it *does help!
but alas i get
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- openssl (LoadError)

with "apt-get install libopenssl-ruby1.8"
The following packages have unmet dependencies:
libopenssl-ruby1.8: Depends: libruby1.8 (>= 1.8.5) but it is not
going to be installed

and
libruby1.8 is already the newest version.

M

Jamis Buck

unread,
Mar 10, 2009, 12:33:19 PM3/10/09
to capis...@googlegroups.com
Ah, and thus we encounter one of my biggest reasons for hating Debian.
:) I have no idea how to solve that. I'll let other debianistas help you
with that one.

- Jamis

lamp5matt

unread,
Mar 10, 2009, 12:34:42 PM3/10/09
to Capistrano
Is it possible to just gem install an older capistrano, namely 2.4? I
only ever use basic, boring update tasks, for which 2.4 worked
perfectly, for a long time. Debian (4.0) doesn't seem to want to
cooperate..

Jamis Buck

unread,
Mar 10, 2009, 12:40:13 PM3/10/09
to capis...@googlegroups.com
If the problem is that openssl for ruby isn't installed, no capistrano
should work. Every capistrano depends on net-ssh, which depends on openssl.

- Jamis

Donovan Bray

unread,
Mar 10, 2009, 8:07:08 PM3/10/09
to capis...@googlegroups.com
You can apt-get ruby, but don't apt-get rubygems; install it from the
tarball. Instructions are on the official ruby site. Look for the
"recommended way" for installing on debian/ubuntu

lamp5matt

unread,
Mar 11, 2009, 12:24:57 PM3/11/09
to Capistrano

On Mar 10, 6:07 pm, Donovan Bray <donno...@gmail.com> wrote:
> You can apt-get ruby, but don't apt-get rubygems; install it from the  
> tarball.  

We have a winner
For anyone who stumbles by, I used apt-get to remove rubygems,
installed from tarball/setup.rb per Donovan, and this resulted in the
command "gem1.8" and a prompt that I would have to remove the "gem"
command manually.

I didn't do this, as everything seems to be working fine.

(Can "solved" be added to the thread title, for the benefit of
others?)
mwic
Reply all
Reply to author
Forward
0 new messages