2012-08-01 30 views
0

有人能理解这个输出吗?这是一个漫长的一天,我的眼睛正在上釉。昨天它似乎工作正常。rake db:生产服务器上的种子故障

rake db:seed --trace 
rake aborted! 
cannot load such file -- ruby-debug 

/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `block in require' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:119:in `require' 
/home/cooperative/apps/cooperative/releases/20120801010134/config/application.rb:7:in `<top (required)>' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
/home/cooperative/apps/cooperative/releases/20120801010134/Rakefile:5:in `<top (required)>' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load_rakefile' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:501:in `raw_load_rakefile' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:82:in `block in load_rakefile' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:81:in `load_rakefile' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:65:in `block in run' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling' 
/home/cooperative/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:63:in `run' 
/home/cooperative/.rbenv/versions/1.9.3-p194/bin/rake:32:in `<main>' 
+0

谢谢约翰编辑我的帖子。其中一天,我必须学习正确的发布格式。 – bytemonger 2012-08-01 02:36:15

回答

0

看起来你刚刚更新了Ruby到1.9.3,并且显然在那个和ruby-debug之间存在一些问题。有关如何(可能)使其工作的详细信息,请参阅http://devnet.jetbrains.net/thread/431168

+0

当我想在开发中使用调试时我意识到了这个问题,并且我从rubyforge安装了linecache19(0.5.13)。无法理解为什么db:seed需要在生产服务器上进行调试。我只在开发组中进行ruby-debug。如果我把它移到全球组,那么capistrano甚至不会抱怨它找不到linecache19宝石。排序catch22的情况。 – bytemonger 2012-08-01 03:01:17

+1

关于为什么db:seed需要调试 - 在你工作的shell中,RAILS_ENV设置为“production”,还是运行RAILS_ENV = production rake db:seed?如果没有,那么这个任务将在开发环境中执行,并且需要:开发组中的所有宝石。 – 2012-08-01 03:15:24

+0

感谢您指出这一点。我决定使用捆绑软件包,并检查所有宝石进入回购。如果我在服务器上执行bundle install -local,我会看看它是否解决了问题。 – bytemonger 2012-08-01 03:16:36

0

它似乎没有安装ruby-debug gem,在运行rake db:seed之前使用bundle install。

确保它包含在gem文件中。请检查ruby-debug19 on ruby-1.9.3-preview1,它可能会帮助你。