错误捆绑:gem“取决于activesupport(= 3.0.0)”,其中app“依赖于activesupport(4.0.0)”

时间:2013-09-11 20:33:48

标签: ruby-on-rails bundler

在gem中,我指定了spec.add_dependency "active_support",但是当我将我的gem添加到Rails 4项目和bundle时,我得到一个奇怪的错误:

$ bundle
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    my_gem (>= 0.0.5) ruby depends on
      activesupport (= 3.0.0) ruby

    rails (= 4.0.0) ruby depends on
      activesupport (4.0.0)

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

原来我必须在没有下划线的情况下将其更改为spec.add_dependency "activesupport"。据推测,旧名称中有宝石,但只有3.0.0。