Rakefile中的宝石(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”])
这不会阻止你释放你的ruby,但不允许你安装它:
gem install gemfoo ERROR: Error installing gemfoo: gemfoo requires gemfoo (>= 0)
我该如何解决?
珠宝商1.6.0
解决方法
在你的耙子文件中有些东西坏了.珠宝商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