2017-04-03 9 views
1

방금 ​​CLI 데이터 젬을 작성하여 RubyGems에 게시했습니다. 내가하려고하면 이제 번들 설치, 나는 다음과 같은 오류가gem에 CLI 데이터의 오류가 있습니다.

``

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   = ["'[email protected]'"] 

    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 

나는이 문제를 해결하려면 어떻게해야합니까? 당신의 도움에 미리 감사드립니다.

답변

3

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

에서 그것은 gemspec 그래서 저장소에서 파일 popular_deals-0.1.0.gem을 제거 명령

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

에서 파일의 목록을 가져옵니다 및 작동해야하기 때문에 이런 일이 발생 밝혀졌습니다.

+1

제안 해 주셔서 감사 드리며 작동하지 않았습니다. :-( –

+0

@HimaChhag 파일 저장소를 gem 저장소로 푸시 했습니까? 여전히 https://github.com/HimaChitalia/popular-deals-from-slickdeals.net-cli – otaviko

+0

에서 볼 수 있습니다. 아니, 나 그냥 로컬 솔루션을 찾으려고했을뿐입니다. 내가 가지고 있습니까? –