问题描述
我在将版本上传到 heroku 时遇到错误.
I'm getting an error when uploading a release to heroku.
!LoadError: 无法加载此类文件 -- mimemagic/overlay
! LoadError: cannot load such file -- mimemagic/overlay
我按照建议成功运行了 'bundle exec rake -P' 命令,但在输出中看不到任何 mimemagic.我以前从未考虑过 mimemagic.我认为它被其他宝石吸引,特别是carrierwave".我找到了一个对话(https://github.com/rails/rails/issues/41757) 他们的 gem 在最近几天被修改了,想知道我是不是被一个重大更新发现了.
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.
推荐答案
Mimemagic 是 Marcel 的一个依赖项,它是... ActiveStorage 的一个依赖项的依赖项.维护人员刚刚更改了许可证(我认为是本周),这引起了骚动.
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.
您需要 3.6 到 3.9 之间的版本的 mimemagic.你可以在你的 Gemfile gem "mimemagic", "~>0.3.6"
.然后运行bundle update marcel mimemagic
.如果您使用的是 mac,请先运行 brew install shared-mime-info
.
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.
这篇关于Heroku: LoadError: 无法加载此类文件 -- mimemagic/overlay的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!