Bis*_*lli 12 rubygems ruby-on-rails gemspecs
当我从github安装一个gem它给我错误:
number_internationalizer at /usr/local/rvm/gems/ruby-1.9.3-p194@number_internationalizer/bundler/gems/number_internationalizer-c0d642b04e87 did not have a valid gemspec.
This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
The validation message from Rubygems was:
"FIXME" or "TODO" is not a description
Run Code Online (Sandbox Code Playgroud)
gemspec是:
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'number_internationalizer/version'
Gem::Specification.new do |gem|
gem.name = "number_internationalizer"
gem.version = NumberInternationalizer::VERSION
gem.authors = ["Myself"]
gem.email = ["myemail@email.com"]
gem.description = %q{Internationalize numbers adding normalization, validation and modifying the number field to restor the value to its original if validation fails}
gem.summary = gem.description
gem.homepage = ""
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
end
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个错误?
该错误似乎与您显示的 gemspec 不同步,该错误表明gem.descripton
它无效。根据错误,您正在使用来自 git 的 Gem,它有一个修复无效 gem.description的提交。
让 Bundler 更新到最新的number_internationalizer
提交:
bundle update
Run Code Online (Sandbox Code Playgroud)
这个答案并不适用于所有情况,但如果您的blob.gemspec
文件中有这样的内容:
spec.summary = "TODO: Write a short summary, because Rubygems requires one."
spec.homepage = "TODO: Put your gem's website or public repo URL here."
Run Code Online (Sandbox Code Playgroud)
您应该从中删除“TODO”一词,并为 提供有效的 HTTP URI spec.homepage
,您可以像这样替换它:
spec.summary = "Write a short summary, because Rubygems requires one."
spec.homepage = "http://website.com"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
11775 次 |
最近记录: |