/ bundle install'运行'bundle gem [gemname]'后给出错误

时间:2015-07-11 14:27:46

标签: ruby-on-rails ruby gem

我正在尝试创建我的第一个红宝石宝石。运行bundle gem familysearch2后,我开始运行bundle install

The gemspec at
/code/familysearch2-rb/familysearch2/familysearch2.gemspec is not
valid. The validation error was '"FIXME" or "TODO" is not a description'

我的gemspec文件如下所示:

   Gem::Specification.new do |s|
  s.name        = "familysearch2"
  s.version     = "0.0.1"
  s.platform    = Gem::Platform::RUBY
  s.authors     = ["kinezu"]
  s.homepage    = "https://github.com/kinezu/familysearch2-rb"
  s.summary     = %q{Ruby gem for access the familysearch api.}
  s.description = %q{Ruby gem for access the familysearch api}

  s.files         = `git ls-files`.split("\n")
  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
  s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
  s.require_paths = ["lib"]

  s.add_dependency 'json'
  s.add_dependency 'faraday'

  s.add_development_dependency 'rspec'
end

2 个答案:

答案 0 :(得分:0)

您的摘要和说明现在看起来很好。也许您需要进行捆绑更新。

请记住在使用您可以执行的gem的应用程序的Gemfile中:

NS_ASSUME_NONNULL_BEGIN

答案 1 :(得分:0)

好的,我回答了自己的菜鸟问题:

新的gemspec文件:

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

Gem::Specification.new do |spec|
  spec.name          = "familysearch2"
  spec.version       = Familysearch2git::VERSION
  spec.authors       = ["kinezu"]
  spec.email         = ["test@test.test"]

  spec.summary       = "Familysearch api tool"
  spec.description   = "Familysearch api tool"
  spec.homepage      = "https://github.com/kinezu/familysearch2-rb"
  spec.license       = "MIT"


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

  spec.add_dependency 'json'
  spec.add_dependency 'faraday'

  spec.add_development_dependency 'rspec'
  spec.add_development_dependency "bundler", "~> 1.10"
  spec.add_development_dependency "rake", "~> 10.0"
end

在此之后,我跑了:

gem build familysearch2.gemspec
rake build
gem push pkg/familysearch2-0.1.0.gem