Search code examples
ruby-on-railscapistranounicornrbenv

deploying to a vps


I'm trying to deploy my app and getting this error with capistrano deploy:cold. Any ideas? My environment includes ubuntu 12.10, postgresql, rbenv-installer, unicorn.

 * executing "cd /home/deployer/apps/microv/releases/20130210112032 && bundle install --gemfile /home/deployer/apps/microv/releases/20130210112032/Gemfile --path /home/deployer/apps/microv/shared/bundle --deployment --quiet --without development test"
    servers: ["192.xx.xxx.xxx"]
    [192.xx.xxx.xxx] executing command
 ** [out :: 192.xx.xxx.xxx] sh: 1: bundle: not found
    command finished in 228ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/deployer/apps/microv/releases/20130210112032; true"
    servers: ["192.xx.xxx.xxx"]
    [192.xx.xxx.xxx] executing command
    command finished in 227ms
failed: "sh -c 'cd /home/deployer/apps/microv/releases/20130210112032 && bundle install --gemfile /home/deployer/apps/microv/releases/20130210112032/Gemfile --path /home/deployer/apps/microv/shared/bundle --deployment --quiet --without development test'" on 192.xx.xxx.xxx

Solution

  • Find solution add this at the top of deploy.rb require "bundler/capistrano" set :default_environment, { 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" }