Note that there are some explanatory texts on larger screens.

plurals
  1. POCapistrano VPS deploy error
    primarykey
    data
    text
    <p>I am using Capistrano to deploy to a VPS. In my <code>deploy.rb</code>:</p> <pre><code>require "bundler/capistrano" server "xxx.xxx.xx.xxx", :web, :app, :db, primary: true set :application, "riffbox" set :user, "root" set :deploy_to, "/home/#{user}/apps/#{application}" set :deploy_via, :remote_cache set :use_sudo, false set :scm, "git" set :repository, "https://xxxx@bitbucket.org/xxxx/iv.git" set :branch, "master" default_run_options[:pty] = true ssh_options[:forward_agent] = true after "deploy", "deploy:cleanup" # keep only the last 5 releases </code></pre> <p>And I got following errors when running <code>cap deploy:cold</code>: </p> <pre><code> * 2013-04-13 22:59:38 executing `bundle:install' * executing "cd /home/root/apps/riffbox/releases/20130413105936 &amp;&amp; bundle install --gemfile /home/root/apps/riffbox/releases/20130413105936/Gemfile --path /home/root/apps/riffbox/shared/bundle --deployment --quiet --without development test" servers: ["198.199.74.146"] [198.199.74.146] executing command ** [out :: 198.199.74.146] **ERROR: Gem bundler is not installed, run `gem install bundler` first.** ** [out :: 198.199.74.146] command finished in 915ms *** [deploy:update_code] rolling back * executing "rm -rf /home/root/apps/riffbox/releases/20130413105936; true" servers: ["198.199.74.146"] [198.199.74.146] executing command command finished in 907ms **failed: "sh -c 'cd /home/root/apps/riffbox/releases/20130413105936 &amp;&amp; bundle install --gemfile /home/root/apps/riffbox/releases/20130413105936/Gemfile --path /home/root/apps/riffbox/shared/bundle --deployment --quiet --without development test'" on 198.199.74.146** </code></pre> <p>I can see there are two errors, <code>Bundler</code> cannot be found and the other one failed to run the <code>sh</code> command. I followed instruction (<a href="https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm" rel="nofollow">https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm</a>) to install rvm, rubygem and rails on my VPS using the <code>root</code> user. </p> <p>What else I am missing? </p> <p><strong>Update</strong> </p> <p>I am using rvm-capistrano, and installed everything using the created user, and got a different error now when deploy:cold:<br/></p> <blockquote> <p>executing "if [ -d /home/app/riffbox/shared/cached-copy ]; then cd /home/app/riffbox/shared/cached-copy &amp;&amp; git fetch -q origin &amp;&amp; git fetch --tags -q origin &amp;&amp; git reset -q --hard 2afbd8fb661f62a01e0940be38e70915fc3e32ea &amp;&amp; git clean -q -d -x -f; else git clone -q git@bitbucket.org:xxx/iv.git /home/app/riffbox/shared/cached-copy &amp;&amp; cd /home/app/riffbox/shared/cached-copy &amp;&amp; git checkout -q -b deploy 2afbd8fb661f62a01e0940be38e70915fc3e32ea; fi"<br/> servers: ["198.199.74.146"]<br/> Password: <br/> [198.199.74.146] executing command<br/> ** [198.199.74.146 :: err] <strong>fatal: could not read Password for '<a href="https://xxx@bitbucket.org" rel="nofollow">https://xxx@bitbucket.org</a>':</strong> No such device or address<br/> Password: <br/> command finished in 7399ms<br/> <strong>* [deploy:update_code] rolling back<br/> * executing "rm -rf /home/app/riffbox/releases/20130414224249; true"<br/> servers: ["198.199.74.146"]<br/> [198.199.74.146] executing command<br/> command finished in 586ms<br/> **failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.3@myapp' -c 'if [ -d /home/app/riffbox/shared/cached-copy ]; then cd /home/app/riffbox/shared/cached-copy &amp;&amp; git fetch -q origin &amp;&amp; git fetch --tags -q origin &amp;&amp; git reset -q --hard 2afbd8fb661f62a01e0940be38e70915fc3e32ea &amp;&amp; git clean -q -d -x -f; else git clone -q git@bitbucket.org:xxx/iv.git /home/app/riffbox/shared/cached-copy &amp;&amp; cd /home/app/riffbox/shared/cached-copy &amp;&amp; git checkout -q -b deploy 2afbd8fb661f62a01e0940be38e70915fc3e32ea; fi'" on 198.199.74.146</strong></p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload