Bundler无法找到适用于gem mime类型的兼容版本 [英] Bundler could not find compatible versions for gem mime-types

查看:820
本文介绍了Bundler无法找到适用于gem mime类型的兼容版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对这个问题感到莫名其妙。一切工作都很好,但是当我部署到Heroku时,它遇到了这个错误:

  Bundler找不到兼容版本的宝石mime -types:
在Gemfile中:
rails(= 3.2.17)ruby依赖于
mime-types(〜> 1.16)ruby
stripe(> = 0) ruby依赖于
mime-types(2.3)

我试过gem安装mime-类型2.3既在gemfile中也在命令行中,并且都没有给出任何很好的结果,但也许是因为我缺乏经验。



如果我有头发,我会拔出来!再次,这个问题只发生在部署到Heroku时。我已经能够解决类似的问题:

  Bundler找不到兼容版本的gemmime-types:
在Gemfile中:
rails(= 4.0.7)ruby depends on
mime-types(〜> 1.16)ruby

stripe(〜> 1.15.0)ruby依赖于
mime-types(2.3)

通过抛弃我的 Gemfile.lock 并运行 bundle install



希望这有助于您!


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.

解决方案

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!

这篇关于Bundler无法找到适用于gem mime类型的兼容版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆