<p>While following <a href="https://cloud.google.com/solutions/migrating-ruby-on-rails-apps-on-heroku-to-gke" rel="nofollow noreferrer">https://cloud.google.com/solutions/migrating-ruby-on-rails-apps-on-heroku-to-gke</a> I get the error:</p>
<pre><code>&quot;/usr/local/lib/ruby/2.6.0/rubygems.rb:283:in find_spec_for_exe': Could not find 'bundler' (2.2.15) required by your /usr/src/app/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.2.15`
        from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
        from /usr/local/bin/bundle:23:in `&lt;main&gt;'&quot;
</code></pre>
<p>when I try to run: <code>docker build -t ruby-app .</code></p>
<p>Anybody know what's wrong?</p>

Richard Teeuwen
<p>Adding the line</p>
<pre><code>RUN gem install bundler
</code></pre>
<p>in the Dockerfile before the line</p>
<pre><code>RUN bundle install
</code></pre>
<p>did the trick.</p>
