Rakefile中Gem的(gemfoo)珠宝商声明如下所示:
Jeweler::Tasks.new do |gem|
#truncated
gem.add_runtime_dependency 'nokogiri', '~> 1.4.1'
gem.add_development_dependency 'jeweler'
end
问题在于它在gemfoo.gemspec文件中生成以下依赖项:
s.add_runtime_dependency(%q<gemfoo>, [">= 0"])s.add_runtime_dependency(%q<nokogiri>, ["~> 1.4.1"])s.add_development_dependency(%q<jeweler>, [">= 0"])
这不会阻止您释放rubygem,但不允许您安装它:
gem install gemfoo
ERROR: Error installing gemfoo:
gemfoo requires gemfoo (>= 0)
我该如何解决?
珠宝商1.6.0
最佳答案
您的Rakefile中有东西坏了。珠宝商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 = "[email protected]"
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
-生成的gemspec文件没有您正在描述的工件。