2012-08-01 35 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,它可能會幫助你。