title: Multiple errors on capistrano deploy
body: <p>Hi so I'm trying to deploy using Capistrano to a server, on the server I have <code>rails</code> <code>bundler</code> and everything else installed, however, here is the Capistrano log</p>
  
  <p><a href="https://gist.github.com/benbagley/cf8233aaa0c5adac0fa09f2194fc6890" rel="nofollow noreferrer">https://gist.github.com/benbagley/cf8233aaa0c5adac0fa09f2194fc6890</a></p>
  
  <p>Here is the trimmed down version of just the errors:</p>
  
  <pre><code>00:27 deploy:assets:precompile
        01 RBENV_ROOT=/home/poladmin/.rbenv RBENV_VERSION=2.5.1 /home/poladmin/.rbenv/bin/rbenv exec rake assets:precompile
        01 rake aborted!
        01 Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
        01
        01 Caused by:
        01 LoadError: cannot load such file -- bundler/setup
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
        01 /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
        01 (See full trace by running task with --trace)
  #&lt;Thread:0x000056102ca202a0@/home/ben/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:10 run&gt; terminated with exception (report_on_exception is true):
  Traceback (most recent call last):
          1: from /home/ben/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
  /home/ben/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as poladmin@196.28.51.162: rake exit status: 1 (SSHKit::Runner::ExecuteError)
  rake stdout: Nothing written
  rake stderr: rake aborted!
  Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  
  Caused by:
  LoadError: cannot load such file -- bundler/setup
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  (See full trace by running task with --trace)
  (Backtrace restricted to imported tasks)
  cap aborted!
  SSHKit::Runner::ExecuteError: Exception while executing as poladmin@196.28.51.162: rake exit status: 1
  rake stdout: Nothing written
  rake stderr: rake aborted!
  Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  
  Caused by:
  LoadError: cannot load such file -- bundler/setup
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  (See full trace by running task with --trace)
  
  
  Caused by:
  SSHKit::Command::Failed: rake exit status: 1
  rake stdout: Nothing written
  rake stderr: rake aborted!
  Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  
  Caused by:
  LoadError: cannot load such file -- bundler/setup
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  (See full trace by running task with --trace)
  
  Tasks: TOP =&gt; deploy:assets:precompile
  (See full trace by running task with --trace)
  The deploy has failed with an error: Exception while executing as poladmin@196.28.51.162: rake exit status: 1
  rake stdout: Nothing written
  rake stderr: rake aborted!
  Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  
  Caused by:
  LoadError: cannot load such file -- bundler/setup
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/boot.rb:3:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/config/application.rb:1:in `&lt;top (required)&gt;'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `require_relative'
  /home/poladmin/poetry_out_loud_v2/releases/20180629214135/Rakefile:4:in `&lt;top (required)&gt;'
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>It's in a gist due to its size.</p>
  
  <p>Here is the gem list on the server</p>
  
  <pre><code>*** LOCAL GEMS ***
  
  actioncable (5.2.0)
  actionmailer (5.2.0)
  actionpack (5.2.0)
  actionview (5.2.0)
  activejob (5.2.0)
  activemodel (5.2.0)
  activerecord (5.2.0)
  activestorage (5.2.0)
  activesupport (5.2.0)
  arel (9.0.0)
  bigdecimal (default: 1.3.4)
  builder (3.2.3)
  bundler (1.16.2)
  cmath (default: 1.0.0)
  concurrent-ruby (1.0.5)
  crass (1.0.4)
  csv (default: 1.0.0)
  date (default: 1.0.0)
  did_you_mean (1.2.0)
  erubi (1.7.1)
  etc (default: 1.0.0)
  fcntl (default: 1.0.0)
  fiddle (default: 1.0.0)
  fileutils (default: 1.0.2)
  globalid (0.4.1)
  i18n (1.0.1)
  io-console (default: 0.4.6)
  ipaddr (default: 1.2.0)
  json (default: 2.1.0)
  loofah (2.2.2)
  mail (2.7.0)
  marcel (0.3.2)
  method_source (0.9.0)
  mimemagic (0.3.2)
  mini_mime (1.0.0)
  mini_portile2 (2.3.0)
  minitest (5.10.3)
  net-telnet (0.1.1)
  nio4r (2.3.1)
  nokogiri (1.8.3)
  openssl (default: 2.1.0)
  power_assert (1.1.1)
  psych (default: 3.0.2)
  rack (2.0.5)
  rack-test (1.0.0)
  rails (5.2.0)
  rails-dom-testing (2.0.3)
  rails-html-sanitizer (1.0.4)
  railties (5.2.0)
  rake (12.3.0)
  rdoc (default: 6.0.1)
  scanf (default: 1.0.0)
  sdbm (default: 1.0.0)
  sprockets (3.7.2)
  sprockets-rails (3.2.1)
  stringio (default: 0.0.1)
  strscan (default: 1.0.0)
  test-unit (3.2.7)
  thor (0.20.0)
  thread_safe (0.3.6)
  tzinfo (1.2.5)
  webrick (default: 1.4.2)
  websocket-driver (0.7.0)
  websocket-extensions (0.1.3)
  xmlrpc (0.3.0)
  zlib (default: 1.0.0)
  </code></pre>