LoginSignup
41
20

More than 3 years have passed since last update.

[Rails] bundle installがYour bundle is locked to mimemagic (0.3.5)...で落ちる

Last updated at Posted at 2021-03-24

Github Actionsで突然bundle installがコケた。。


Fetching gem metadata from https://rubygems.org/............
Your bundle is locked to mimemagic (0.3.5), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.5) has removed it. You'll need to update
your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
in order to install.

mimemagicの0.3.5が削除されたらしい

rubygemsのサイトをみてみると

0.4.0 - March 24, 2021 (42.5KB)
0.3.6 - March 24, 2021 (407KB)
0.3.5 - May 04, 2020 (401KB) yanked
0.3.4 - January 28, 2020 (401KB) yanked

0.3.5はyanked(公開停止)されているようなのでアップデートすればOKです

bundle update mimemagic

今回はmimemagicでしたが、他のgemの場合でも同様の対応でいいのかな?と思います!

[追記] Gem::Ext::BuildError: ERROR: Failed to build gem native extension.でdockerのbuildが落ちる。

 Could not find MIME type database in the following locations:
["/usr/local/share/mime/packages/freedesktop.org.xml",
"/opt/homebrew/share/mime/packages/freedesktop.org.xml",
"/usr/share/mime/packages/freedesktop.org.xml"]

Ensure you have either installed the shared-mime-info package for your distribution, 
or obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.

エラー文をよくよく読んでいくと
installed the shared-mime-info package for your distribution
あるいは
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.
とのことで、後者はめんどくさそうなので shared-mime-info というパッケージをインストールする。

私の環境ではalpineを使用しているので


RUN apk add --update --no-cache shared-mime-info

これでOKです!

昨日からmimemagicがてんやわんやしてるのは、どうやらライセンス問題があったようで。。
詳しくは、経緯などをまとめてくださっている方がいるのでググってみてください!

41
20
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
41
20