title: LoadError: incompatible library version, when deploying with capistrano to Digital Ocean
body: <p>When I run cap staging deploy, I get the error </p>
  
  <pre><code>LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
  </code></pre>
  
  <p>Assets won't precompile when deploying with capistrano to production on Amazon EC2. But I didn't find any solution there.</p>
  
  <pre><code>00:42 deploy:assets:precompile
        01 bundle exec rake assets:precompile
        01 rake aborted!
        01 LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `rescue in &lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:8:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in &lt;to…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:43:in `rescue in with_g…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:39:in `with_gems'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `&lt;top (requir…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
        01 /usr/local/bin/bundle:23:in `load'
        01 /usr/local/bin/bundle:23:in `&lt;main&gt;'
        01
        01 Caused by:
        01 LoadError: cannot load such file -- msgpack/2.6/msgpack
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in &lt;to…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:43:in `rescue in with_g…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:39:in `with_gems'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `&lt;top (requir…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
        01 /usr/local/bin/bundle:23:in `load'
        01 /usr/local/bin/bundle:23:in `&lt;main&gt;'
        01
        01 Caused by:
        01 LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `rescue in &lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:8:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in &lt;to…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:40:in `with_gems'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `&lt;top (requir…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
        01 /usr/local/bin/bundle:23:in `load'
        01 /usr/local/bin/bundle:23:in `&lt;main&gt;'
        01
        01 Caused by:
        01 LoadError: cannot load such file -- msgpack/2.6/msgpack
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in &lt;to…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:40:in `with_gems'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `&lt;top (requir…
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
        01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
        01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `&lt;top (required)&gt;'
        01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
        01 /usr/local/bin/bundle:23:in `load'
        01 /usr/local/bin/bundle:23:in `&lt;main&gt;'
        01 (See full trace by running task with --trace)
  #&lt;Thread:0x00005581529e8788@/home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run&gt; terminated with exception (report_on_exception is true):
  Traceback (most recent call last):
    13: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
    12: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
    11: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
    10: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in &lt;top (required)&gt;'
     9: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:89:in `within'
     8: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in &lt;top (required)&gt;'
     7: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:97:in `with'
     6: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in &lt;top (required)&gt;'
     5: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:78:in `execute'
     4: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
     3: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `tap'
     2: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
     1: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:169:in `execute_command'
  /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/command.rb:99:in `exit_status=': rake exit status: 1 (SSHKit::Command::Failed)
  rake stdout: Nothing written
  rake stderr: rake aborted!
  </code></pre>