Why does bundler think it needs a specific version when the gemspec specifies a pessimistic constraint?

本小妞迷上赌 提交于 2020-01-05 07:46:22

问题


My gemspec clearly requires active_support ~> 3.0, but bundler is failing to bundle install saying that my gem requires active_support = 3.0. WTF bundler? Can anyone explain this?

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

$ 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)

来源:https://stackoverflow.com/questions/14697648/why-does-bundler-think-it-needs-a-specific-version-when-the-gemspec-specifies-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!