Rails 4: savonrb > wasabi - mime 类型版本的依赖冲突

Rails 4: savonrb > wasabi - Dependency conflict for mime-types version

我想安装 savon gem 来解析一些 WSDL。在将其包含在 Gemfile 和 运行 捆绑安装中后,它会给出以下消息:

Bundler could not find compatible versions for gem "mime-types":
  In Gemfile:
    savon (~> 2.8.0) ruby depends on
      wasabi (= 3.3.0) ruby depends on
        mime-types (< 2.0.0) ruby

    mail (>= 0) ruby depends on
      mime-types (2.4.3)

我无法删除邮件 gem 来解决此依赖关系,因为我的 actionmailer 依赖于它。此外,它似乎不是解决此类依赖冲突的健康解决方案。

所以有人可以帮我解决这个问题吗?谷歌搜索没有多大帮助。

如果您只需要解析 一个 WSDL,您可以单独使用当前版本 (3.3.1) 的 wasabi,which does not depend on the mime-types gem anymore

如果你需要savon,有一个pending issue to update the dependency to the next minor version of wasabi, to resolve this issue. Since this has not happened yet, you may clone this repo, do it yourself (replace 3.3.0 with 3.3.1 in this file)并安装你自己的版本:

gem 'savon', github: 'xxx/myrepo'

直到萨翁更新。