Pergunta

I am trying to deploy my rails app to Linode VPS but after i finished all steps when i did xxx@xxxx-desktop:~/myrailsapp$ cap deploy:cold

i got following error:

failed: "env PATH=$HOME/.rvm/shims:$HOME/.rvm/bin:$PATH sh -c 'cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test'" on xxx.xxx.xxx.xxx

full log is below:

xxx@xxx-desktop:~/myrailsapp$ cap deploy:cold
  * 2013-04-22 15:44:59 executing `deploy:cold'
  * 2013-04-22 15:44:59 executing `deploy:update'
 ** transaction: start
  * 2013-04-22 15:44:59 executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote git@bitbucket.org:myrailsapp/myrailsapp.git master"
    command finished in 5385ms
  * executing "if [ -d /home/deployer/apps/myrailsapp/shared/cached-copy ]; then cd /home/deployer/apps/myrailsapp/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 88641306c92790d13f95beb7a2826a072ab72df4 && git clean -q -d -x -f; else git clone -q git@bitbucket.org:myrailsapp/myrailsapp.git maste /home/deployer/apps/myrailsapp/shared/cached-copy && cd /home/deployer/apps/myrailsapp/shared/cached-copy && git checkout -q -b deploy 88641306c92790d13f95beb7a2826a072ab72df4; fi"
    servers: ["xxx.xxx.xxx.xxx"]
Password: 
    [xxx.xxx.xxx.xxx] executing command
    command finished in 5786ms
    copying the cached version to /home/deployer/apps/myrailsapp/releases/20130422101521
  * executing "cp -RPp /home/deployer/apps/myrailsapp/shared/cached-copy /home/deployer/apps/myrailsapp/releases/20130422101521 && (echo 88641306c92790d13f95beb7a2826a072ab72df4 > /home/deployer/apps/myrailsapp/releases/20130422101521/REVISION)"
    servers: ["xxx.xxx.xxx.xxx"]
    [xxx.xxx.xxx.xxx] executing command
    command finished in 951ms
  * 2013-04-22 15:45:22 executing `deploy:finalize_update'
    triggering before callbacks for `deploy:finalize_update'
  * 2013-04-22 15:45:22 executing `deploy:assets:symlink'
  * executing "rm -rf /home/deployer/apps/myrailsapp/releases/20130422101521/public/assets && mkdir -p /home/deployer/apps/myrailsapp/releases/20130422101521/public && mkdir -p /home/deployer/apps/myrailsapp/shared/assets && ln -s /home/deployer/apps/myrailsapp/shared/assets /home/deployer/apps/myrailsapp/releases/20130422101521/public/assets"
    servers: ["xxx.xxx.xxx.xxx"]
    [xxx.xxx.xxx.xxx] executing command
    command finished in 993ms
  * 2013-04-22 15:45:23 executing `bundle:install'
  * executing "cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test"
    servers: ["xxx.xxx.xxx.xxx"]
    [xxx.xxx.xxx.xxx] executing command
 ** [out :: xxx.xxx.xxx.xxx] ERROR: Gem bundler is not installed, run `gem install bundler` first.
    command finished in 974ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/deployer/apps/myrailsapp/releases/20130422101521; true"
    servers: ["xxx.xxx.xxx.xxx"]
    [xxx.xxx.xxx.xxx] executing command
    command finished in 971ms
failed: "env PATH=$HOME/.rvm/shims:$HOME/.rvm/bin:$PATH sh -c 'cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test'" on xxx.xxx.xxx.xxx
Foi útil?

Solução

You are getting the error:

Bundler is not installed

Before in your linode server you must install bundler with:

gem install bundler

Also, You must add in top to your deploy.rb

require "bundler/capistrano"

Also, you problem is rvm has not been added to PATH:

You can take a look to this question:

Ruby on Rails RVM $PATH issue

Regards!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top