Tar a bundler project and send to another system
<p>I have two systems that use the same command line interface written in ruby. One system is using an older version that's incompatible with the scripts we have written. We'd like to use bundler to download all the dependencies for the <code>2.0</code> on our own system, and then migrate that <code>bundle</code> over to the system with the older version so that we can use <code>2.0</code> there as well.</p>

<p><strong>We do not have the option to run <code>bundle install</code> on the other system because it's not open to the internets.</strong></p>

<p>So the idea is on my system:</p>

<p><code>bundle init</code></p>

<p>...write <code>Gemfile</code>...</p>

<p><code>bundle install</code></p>

<p><code>tar -czf cli2.0.tar.gz ./Gemfile ./Gemfile.lock ./.bundle ./bundle</code></p>

<p>... move <code>cli2.0.tar.gz</code> to the other system ...</p>

<p>On system B:</p>

<p><code>tar -zxf cli2.0.tar.gz</code></p>

<p><code>bundle exec cli2.0 version</code></p>

<p>But at this point we get an error stating that <code>bundler</code> couldn't find any of the gems even though they're right there under <code>./bundle/ruby/2.3.0/</code>!! </p>

<p>It looks like they have different versions of <code>ruby</code>, and <code>ruby-gems</code> installed.</p>