No Capistrano in path


#1

When I ssh into my shell, “cap” is not in the path, even though I can see that it’s installed in /usr/lib/ruby/gems/1.8/bin/.
Adding /usr/lib/ruby/gems/1.8/bin/ to the path doesn’t solve the problem either.
Why is it that “cap” can’t be found? How can I solve this


#2

I see the same thing on the server I’m on. To use capistrano without specifying the path, add this line to .bash_profile in your home directory:

PATH="$PATH:/usr/lib/ruby/gems/1.8/bin" Then either log out and back in or type ‘source .bash_profile’. This will make it available without using the full path.

$ which cap $ PATH="$PATH:/usr/lib/ruby/gems/1.8/bin" $ which cap /usr/lib/ruby/gems/1.8/bin/cap


If you want useful replies, ask smart questions.


#3

Thanks. As I mentioned in my post, I already did add that to the path. I didn’t help.

This is what happens:

[geyser]$ echo $PATH
/home/rego/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/rego/ec2/api/bin:/usr/lib/ruby/gems/1.8/bin/
[geyser]$ cap --apply-to .
Cannot find gem for Rails ~>1.2.1.0:
Install the missing gem with ‘gem install -v=1.2.1 rails’, or
change environment.rb to define RAILS_GEM_VERSION with your desired version.

[geyser]$ which cap
/usr/lib/ruby/gems/1.8/bin//cap


#4

Ah, that’s not a path problem at all (contrary to the post subject). You’re executing cap just fine; the problem is that it’s unable to run.

What version of Rails was your application written for, and what version is actually installed on your DH server? The DH server I’m on (gap) is only at 1.1.6. Based on the Capistrano output, I’m going to guess you developed your app with 1.2.1.


If you want useful replies, ask smart questions.


#5

Well I’ll be gosh darned. I was certain I saw news about DH having installed the latest version of Rails.
Solved the problem by installing a local gems repository and installing Capistrano and Rails (1.2.2)
Thank you ever so much [I might be back oagin…]


#6

Wondered if you could be so kind as to send me the deploy.rb (less any sensitive information) that you use? I’m almost there, but the deployment bombs and an example could assist.
Thanks,
Yitzhak


#7

Heh, I would, but I don’t actually use Capistrano for anything. I just keep up on what’s going on even if I don’t have a use for it at the moment. Maybe someone else around here could help.


If you want useful replies, ask smart questions.