在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)
有什么想法吗?
答案 0 :(得分:0)
原来我必须在没有下划线的情况下将其更改为spec.add_dependency "activesupport"
。据推测,旧名称中有宝石,但只有3.0.0。