title: Heroku push rejected error: Failed to install gems via Bundler (probably caused by mimemagic)
body: <p>I try to push my project on heroku and error message pop outs</p>
  <pre class="lang-none prettyprint-override"><code>git push heroku master
  
  
      remote: -----&gt; Building on the Heroku-18 stack
      remote: -----&gt; Using buildpack: heroku/ruby
      remote: -----&gt; Ruby app detected
      remote: -----&gt; Installing bundler 2.2.11
      remote: -----&gt; Removing BUNDLED WITH version in the Gemfile.lock
      remote: -----&gt; Compiling Ruby/Rails
      remote: -----&gt; Using Ruby version: ruby-2.6.3
      remote: -----&gt; Installing dependencies using bundler 2.2.11
      remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
      remote:        Fetching gem metadata from https://rubygems.org/............
      remote:        **Your bundle is locked to mimemagic (0.3.5), but that version could not be found**
      remote:        in any of the sources listed in your Gemfile. If you haven't changed sources,
      remote:        that means the author of mimemagic (0.3.5) has removed it. You'll need to update
      remote:        your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
      remote:        in order to install.
      remote:        Bundler Output: Fetching gem metadata from https://rubygems.org/............
      remote:        Your bundle is locked to mimemagic (0.3.5), but that version could not be found
      remote:        in any of the sources listed in your Gemfile. If you haven't changed sources,
      remote:        that means the author of mimemagic (0.3.5) has removed it. You'll need to update
      remote:        your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
      remote:        in order to install.
      remote: 
      remote:  !
      remote:  !     Failed to install gems via Bundler.
      remote:  !
      remote:  !     Push rejected, failed to compile Ruby app.
      remote: 
      remote:  !     Push failed
      remote:  !
  </code></pre>
  <p>I guess the problem is caused by rails gem mimemagic's version is out of date so I try to update to the latest version, it still doesn't work.</p>
  <p>Here's my ruby, Rails, mimemagic  version</p>
  <pre class="lang-none prettyprint-override"><code>ruby -v
  ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
  
  rails -v
  Rails 6.1.3.1
  
  bundle info mimemagic
    * mimemagic (0.4.3)
  </code></pre>
  <p>information in Gemfile</p>
  <pre><code>gem 'rails', '~&gt; 6.1', '&gt;= 6.1.0'
  gem 'bundler', '~&gt; 2.2', '&gt;= 2.2.1.1'
  gem 'mimemagic', '~&gt; 0.4.3'
  </code></pre>
  <p>in Gemfile.lock</p>
  <pre><code> mimemagic (~&gt; 0.4.3)
  </code></pre>