Ruby 当gempec指定了一个悲观的约束时,为什么bundler认为它需要一个特定的版本?

Ruby 当gempec指定了一个悲观的约束时,为什么bundler认为它需要一个特定的版本?,ruby,rubygems,bundler,Ruby,Rubygems,Bundler,我的gempec显然需要active\u支持~>3.0,但bundler未能bundle安装,说我的gem需要active\u支持=3.0。WTF捆绑机?有人能解释一下吗 $ gem install code_filter Successfully installed activesupport-3.0.0 Successfully installed active_support-3.0.0 Successfully installed code_filter-0.1.1 如何处理act

我的gempec显然需要
active\u支持~>3.0
,但bundler未能
bundle安装
,说我的gem需要
active\u支持=3.0
。WTF捆绑机?有人能解释一下吗

$ gem install code_filter
Successfully installed activesupport-3.0.0
Successfully installed active_support-3.0.0
Successfully installed code_filter-0.1.1



如何处理
activesupport
active\u support
?看起来您依赖的是
主动支持
,但Bundler正在寻找
主动支持
?您有没有发现这一点?我也有类似的问题。不幸的是,我不太记得了。但我认为@bheeshmar是对的,activesupport和active_-support的拼写有点奇怪。比如,它们实际上是两个不同的gem,一个依赖于另一个,或者其他什么……它们重命名了gem–它以前被命名为
active\u-support
,但最新版本是3.0.0:在编写本文时,
activesupport
的最新版本是4.2.0:您希望在较新的项目中使用后者。
$ gem dependency code_filter
Gem code_filter-0.1.1
  active_support (~> 3.0, runtime)
$ bundle
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://192.168.10.22/...
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://192.168.10.22/..
Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    code_filter (= 0.1.1) ruby depends on
      activesupport (= 3.0.0) ruby

    json_builder (~> 3.1) ruby depends on
      activesupport (3.0.20)