can't find gem specified in gemspec with a range
Closed this issue · 2 comments
stepheneb commented
I have a gem, https://github.com/stepheneb/jnlp which specifies a range for nokogiri in the gemspec:
s.add_runtime_dependency('nokogiri', ">= 1.4.4", "<= 1.5")
Am using bundler v1.0.18:
$ bundle --version
Bundler version 1.0.18
When I run bundle install bundler reports it can't find the gem.
In JRuby 1.6.4:
$ bundle install
There was a LoadError while evaluating jnlp.gemspec:
Could not find RubyGem nokogiri (>= 1.4.4, <= 1.5)
In Ruby 1.9.2 p290
$ bundle install
There was a LoadError while evaluating jnlp.gemspec:
Could not find nokogiri (<= 1.5, >= 1.4.4) amongst [abstract-1.0.0, actionmailer-3.1.0 ...
If I install nokogiri manually then the bundle install
command completes successfully.
indirect commented
It's working fine for me with both 1.0.18 and 1.1.pre.8.
$ gem uninstall nokogiri
INFO: gem "nokogiri" is not installed
$ cat Gemfile
source :rubygems
gem "jnlp", "~> 0.7.3"
$ bundle install --path vendor/bundle
Fetching dependency information from the API at http://rubygems.org/.......
Installing nokogiri (1.5.0) with native extensions
Installing jnlp (0.7.3)
Using bundler (1.1.pre.8)
Your bundle is complete! It was installed into ./vendor/bundle
$ rm -rf Gemfile.lock vendor/bundle/
$ bundle _1.0.18_ install --path vendor/bundle
Fetching source index for http://rubygems.org/
Installing nokogiri (1.5.0) with native extensions
Installing jnlp (0.7.3)
Using bundler (1.0.18)
Your bundle is complete! It was installed into ./vendor/bundle
indirect commented
(Unrelated, but I strongly suggest that you change your dependency on nokogiri to "~> 1.4.4", which is the same as [">= 1.4.4", "<1.5.0"])