gpt4 book ai didi

ruby - gem 本身包含 CLI 数据 gem 的错误

转载 作者:数据小太阳 更新时间:2023-10-29 08:15:39 27 4
gpt4 key购买 nike

我刚刚构建了一个 CLI 数据 gem 并将其发布到 RubyGems。现在,如果我尝试进行 bundle 安装,我会收到以下错误

``

You have one or more invalid gemspecs that need to be fixed. 
The gemspec at
/home/himachhag-45739/code/popular-deals-from-slickdeals.net-`cli/popular_deals.gemspec`
is not valid. Please fix this gemspec.
The validation error was 'popular_deals-0.1.0 contains itself
(popular_deals-0.1.0.gem), check your files list'

请看下面我的 gmspec 文件:

# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'popular_deals/version'

Gem::Specification.new do |spec|
spec.name = "popular_deals"
spec.version = PopularDeals::VERSION
spec.authors = ["'Hima Chitalia'"]
spec.email = ["'hima_chhag@yahoo.com'"]

spec.summary = %q{It displays popular deals of the day from https://slickdeals.net/deals/.}
#spec.description = %q{It displays popular deals of the day from https://slickdeals.net/deals/.}
spec.homepage = "https://github.com/HimaChitalia/popular_deals"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.14"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "pry"

spec.add_dependency "nokogiri"
spec.add_dependency "colorize"

end

我应该怎么做才能解决这个问题?预先感谢您的帮助。

最佳答案

来自 http://siawyoung.com/coding/ruby/invalid-gemspec.html

事实证明这是因为 gemspec 从命令中获取了文件列表

`git ls-files -z`.split("\x0")

因此从存储库中删除文件 popular_deals-0.1.0.gem,它应该可以工作。

关于ruby - gem 本身包含 CLI 数据 gem 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43194205/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com