WebFaction
Community site: login faq
0
1
  * executing "cd /home/plehoux/webapps/baboo/abrico/releases/20110902015353 && bundle install --gemfile /home/plehoux/webapps/baboo/abrico/releases/20110902015353/Gemfile --path **/home/plehoux/webapps/baboo/gems/bin/bundle** --deployment --quiet --without development test"
servers: ["plehoux.webfactional.com"]
[plehoux.webfactional.com] executing command
** [out :: plehoux.webfactional.com] sh: bundle: command not found

When I run cap deploy:cold I get the above error message. What I really don't understand is that '/home/plehoux/webapps/baboo/gems/bin/bundle' is the good the path to bundle so can't cap can't find it?

asked 01 Sep '11, 20:59

plehoux
145
accept rate: 0%


Add this to deploy.rb

set :deploy_to, "/home/#{user}/webapps/#{application}"

set :default_environment, {
  'PATH' => "#{deploy_to}/bin:$PATH",
  'GEM_HOME' => "#{deploy_to}/gems" 
}

and after that regular commands will work:

namespace :gems do
  task :bundle, :roles => :app do
    run "cd #{release_path} && bundle install  --deployment --without development test"
  end
end

after "deploy:update_code", "gems:bundle"
permanent link

answered 31 Oct '11, 21:50

romanlv
311
accept rate: 0%

Awesome! Thank you. Wish I had enough reputation points to vote you up.

(06 Nov '11, 14:57) nathanvda

I believe that --path should include the directory to add to the PATH, and not be a direct path to a binary itself. In other words:

--path /home/plehoux/webapps/baboo/gems/bin

Can you try this path and see if it helps? Thanks!

permanent link

answered 01 Sep '11, 21:03

ryans ♦♦
5.0k93460
accept rate: 43%

I tried with both '--path /home/plehoux/webapps/baboo/gems/bin' && '--path /home/plehoux/webapps/baboo/gems/bin/' without success.

(01 Sep '11, 21:33) plehoux

Since Capistrano attempts to deploy over ssh, can you try adding this to your ~/.bashrc file:

export PATH=/home/plehoux/webapps/baboo/gems/bin:$PATH
(01 Sep '11, 21:53) ryans ♦♦

Add it without succes, but an interesting fact I commented in my deploy.rb file set :bundle_dir and add export PATH=/home/plehoux/webapps/baboo/gems/bin:$PATH to ~/.bashrc the error log still refered to /home/plehoux/webapps/baboo/abrico/shared/bundle ...

(01 Sep '11, 22:06) plehoux

I'm not sure why, or how it even knows about the file /home/plehoux/webapps/baboo/abrico/shared/bundle

As a work-around, you could just do:

ln -s $HOME/webapps/baboo/gems/bin/bundle $HOME/webapps/baboo/abrico/shared/bundle`

in order to "force" it to work, but that's not a great solution.

(01 Sep '11, 22:11) ryans ♦♦

strange it's not working.

(01 Sep '11, 22:38) plehoux

Unfortunately we don't have a lot of experience deploying applications with Capistrano, but it doesn't seem this is a problem with the hosting platform. I would recommend directing this question to the Capistrano community forums to see if they have any more valuable input on the issue.

(01 Sep '11, 23:22) ryans ♦♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×20
×8

question asked: 01 Sep '11, 20:59

question was seen: 6,963 times

last updated: 06 Nov '11, 14:57

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM