我想通过运行 rake build 来构建我的gem但是在运行上述命令后出现了这个错误:
cathy:trunk catherine$ rake build --trace
** Invoke build (first_time)
** Execute build
rake aborted!
WARNING: no homepage specified
WARNING: description and summary are identical
WARNING: open-ended dependency on rake (>= 0, development) is not recommended
if rake is semantically versioned, use:
add_development_dependency 'rake', '~> 0'
WARNING: open-ended dependency on si_common (>= 0, development) is not recommended
if si_common is semantically versioned, use:
add_development_dependency 'si_common', '~> 0'
WARNING: See http://guides.rubygems.org/specification-reference/ for help
ERROR: While executing gem ... (NoMethodError)
undefined method `bytesize' for nil:NilClass
/Users/catherine/.rvm/gems/ruby-2.0.0-p598@global/gems/bundler-1.7.8/lib/bundler/gem_helper.rb:149:in `sh'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598@global/gems/bundler-1.7.8/lib/bundler/gem_helper.rb:57:in `build_gem'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598@global/gems/bundler-1.7.8/lib/bundler/gem_helper.rb:39:in `block in install'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/catherine/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/rake:23:in `load'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/rake:23:in `<main>'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `eval'
/Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => build
cathy:trunk catherine$
这可能是什么问题?可能是因为我的一些宝石的版本?如果是,我可以做些什么才能成功构建我的宝石?
我目前正在使用 ruby 2.0.0p259 (2014-11-13修订版48408)[x86_64-darwin10.8.0]和 rails 3.2.20
实际上,我之前能够做到这一点(构建我的宝石并将其安装在我的本地机器上),但我认为我做了一个捆绑更新,这就是为什么它不再起作用了。以为我不是百分百确定它是否真的是原因。