Bundler could not find compatible versions for gem mime-types

僤鯓⒐⒋嵵緔 提交于 2019-12-10 17:32:26

问题


Super baffled by this problem. Everything is working great local but when I deploy to Heroku it hits this error:

Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 3.2.17) ruby depends on
mime-types (~> 1.16) ruby
stripe (>= 0) ruby depends on
mime-types (2.3)

I've tried gem installing mime-types 2.3 both in the gemfile and from the command line and neither have given any great results, though maybe it's from my lack of experience.

If I had hair I'd be pulling it out! Again, this problem only happens when deploying to Heroku. Everything bundle installs and updates fine locally.


回答1:


I was able to resolve a similar problem:

Bundler could not find compatible versions for gem "mime-types":
  In Gemfile:
    rails (= 4.0.7) ruby depends on
      mime-types (~> 1.16) ruby

    stripe (~> 1.15.0) ruby depends on
      mime-types (2.3)

By throwing away my Gemfile.lock and running bundle install.

Hope this helps!




回答2:


There is better way to resolve this msg,

go to your gemfile.lock and change your mime-types version to 1.25.1,

rub bundle install again, then go back to Gemfile.lock and switch mime-types to 2.4.3, and again run bundle install :)




回答3:


Run bundle update mime-types resolved my problem



来源:https://stackoverflow.com/questions/25049694/bundler-could-not-find-compatible-versions-for-gem-mime-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!