Question

Gem's(gemfoo) jeweler declaration in Rakefile looks like that:

Jeweler::Tasks.new do |gem|
  #truncated
  gem.add_runtime_dependency 'nokogiri', '~> 1.4.1'
  gem.add_development_dependency 'jeweler'
end                             

The problem is that it generates the following dependencies in the gemfoo.gemspec file:

s.add_runtime_dependency(%q<gemfoo>, [">= 0"]) s.add_runtime_dependency(%q<nokogiri>, ["~> 1.4.1"]) s.add_development_dependency(%q<jeweler>, [">= 0"])

Which won't stop you from releasing your rubygem but won't allow you to install it:

gem install gemfoo
ERROR:  Error installing gemfoo:
    gemfoo requires gemfoo (>= 0)

How can I fix that?


jeweler 1.6.0

Was it helpful?

Solution

Something is broken in your Rakefile. Jeweler 1.6.0


require 'jeweler'
Jeweler::Tasks.new do |gem|
  gem.name = "gemfoo"
  gem.summary = %Q{TODO: one-line summary of your gem}
  gem.description = %Q{TODO: longer description of your gem}
  gem.email = "john@example.com"
  gem.homepage = "http://www.google.com/"
  gem.authors = ["John Doe"]
  gem.add_runtime_dependency 'nokogiri', '~> 1.4.1'
  gem.add_development_dependency 'jeweler'
end
Jeweler::RubygemsDotOrgTasks.new

rake gemspec - the generated gemspec file doesn't have the artifact you're describing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top