Why does bundler think it needs a specific version

2019-08-09 01:09发布

问题:

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)