ものづくりのブログ

うちのネコを題材にしたものづくりができたらいいなと思っていろいろ奮闘してます。

rails で mimemagic がどうのこうのと... 困る

docker で開発されたツールをセットアップしていたら以下のメッセージが出て bundle install が失敗してしまい困りました。
その時のメモを残しておこうと思います。

問題のメッセージ

 => ERROR [8/8] RUN bundle install                                                                      3.0s
------                                                                                                       
 > [8/8] RUN bundle install:                                                                                 
#12 0.474 The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
#12 1.231 Fetching gem metadata from https://rubygems.org/.........
#12 2.947 Your bundle is locked to mimemagic (0.3.2), but that version could not be found
#12 2.947 in any of the sources listed in your Gemfile. If you haven't changed sources,
#12 2.947 that means the author of mimemagic (0.3.2) has removed it. You'll need to update
#12 2.947 your bundle to a version other than mimemagic (0.3.2) that hasn't been removed
#12 2.947 in order to install.
------
executor failed running [/bin/sh -c bundle install]: exit code: 7

環境

ruby: 2.5.8
rails: 5.2.0

参考にしたサイト

qiita.com
stackoverflow.com

結論

以下の記述を参考に対応したら処理が進みました。
weblog.rubyonrails.org
rails を 5.2.5 にアップデート