Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行命令时出错";rake build“;_Ruby On Rails_Ruby_Rubygems_Rake - Fatal编程技术网

Ruby on rails 运行命令时出错";rake build“;

Ruby on rails 运行命令时出错";rake build“;,ruby-on-rails,ruby,rubygems,rake,Ruby On Rails,Ruby,Rubygems,Rake,我想通过运行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 de

我想通过运行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$
cathy:trunk catherine$rake构建--跟踪 **调用构建(第一次) **执行构建 雷克流产了! 警告:未指定主页 警告:说明和摘要相同 警告:不建议使用对rake(>=0,开发)的开放式依赖关系 如果rake是语义版本化的,请使用: 添加_开发_依赖项'rake','~>0' 警告:不推荐对si_common(>=0,开发)的开放式依赖关系 如果si_common是语义版本,请使用: 添加"开发"依赖项"si_common","~>0" 警告:请参阅http://guides.rubygems.org/specification-reference/ 求救 错误:执行gem时。。。(命名者) nil:NilClass的未定义方法“bytesize” /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\u helper.rb:57:in'build\u 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:在“执行中的块”中 /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:在'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:在“调用任务”中 /Users/catherine/.rvm/gems/ruby-2.0.0-p598/gems/rake-10.4.2/lib/rake/application.rb:106:在“顶层的块(2层)”中 /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:在“顶层块”中 /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:“顶级” /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:在“标准异常处理”中 /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`' /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`' /Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/ruby\u executable\u hooks:15:in'eval' /Users/catherine/.rvm/gems/ruby-2.0.0-p598/bin/ruby\u executable\u hooks:15:in`' 任务:TOP=>build 凯茜:凯瑟琳$ 这里可能有什么问题?可能是因为我的一些宝石的版本吗?如果是,我能做些什么才能成功地构建我的宝石

我目前正在使用ruby 2.0.0p259(2014-11-13修订版48408)[x86_64-darwin10.8.0]和rails 3.2.20


事实上,我以前能够做到这一点(构建我的gem并将其安装在本地机器上),但我认为我做了捆绑更新,这就是为什么它不再工作的原因。我想我不是100%确定这是否真的是原因。

你介意分享一个gemspec吗?我会尝试更新bundler gem(
gem update bundler
),因为1.7.8版已经过时了hi@mudasobwa,我现在可以进行构建了。我可能无意中删除了一些未被跟踪的文件,因为我能够从存储库的新克隆生成。无论如何,谢谢。:)你介意分享一个gemspec吗?我会尝试更新bundler gem(
gem update bundler
),因为版本1.7.8已经过时了dhi@mudasobwa,我现在可以进行构建了。我可能无意中删除了一些未被跟踪的文件,因为我能够从存储库的新克隆生成。无论如何,谢谢。:)