Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku: LoadError: cannot load such file -- mimemagic/overlay

I'm getting an error when uploading a release to heroku.

! LoadError: cannot load such file -- mimemagic/overlay

I successfully ran the 'bundle exec rake -P' command as advised but could not see any mimemagic in the output. I've never had to think about mimemagic before. I think its pulled in by other gems, notably 'carrierwave'. I've found a conversation (https://github.com/rails/rails/issues/41757) where them gem has been amended in the last few days and wonder whether I've been caught by a breaking update.

like image 562
Malcolm Johnson-Brown Avatar asked Oct 21 '25 14:10

Malcolm Johnson-Brown


1 Answers

Mimemagic is a dependency of Marcel which is a dependency of a dependency of ... ActiveStorage. The maintainers just changed the license (I think this week), which caused a ruckus.

You want mimemagic at a version between 3.6 and 3.9. You could set it in your Gemfile gem "mimemagic", "~> 0.3.6". Then run bundle update marcel mimemagic. If you're on a mac, run brew install shared-mime-info first.

like image 192
sam Avatar answered Oct 23 '25 06:10

sam