You could try using the full path to the bundle script in your Capfile, or
adding the gem bin directory to your $PATH. I think using the full path of
bundle would be the less hacky way to do it, something like this:
namespace :bundler do
task :bundle_new_release do
run "cd #{release_path} && /var/lib/gems/1.9.1/bin/bundle install
--without test"
end
end
Another way to do it, would be to enable ssh user environments and update
the path in .ssh/environment http://www.ruby-forum.com/topic/79248#131394
On Thu, Feb 4, 2010 at 5:25 PM, BJ Neilsen <[email protected]> wrote:
> Hi Nick,
>
> > When you ran the command manually were you logged in as deployer?
>
> Yes, I was ssh'd into the server as the deployer user.
>
> > It could be that deployer doesn't have bundle in its path.
> > You could try using cap shell and running `which bundle` to see if it is
> in the environment that capistrano runs in.
>
> Running `which bundle` as the deployer user gives me a path. Running it in
> cap shell fails. You can see the output of both commands by seeing this
> gist[2]. My thought is that one login uses a bash login and the other uses
> an interactive shell, and that the gem path isn't setup properly in one of
> those two, but I'm not sure if that is true.
>
> BJ
>
> [2] http://gist.github.com/295260
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected]<capistrano%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
>
--
-Nick Howard
http://blog.baroquebobcat.com/
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en