2013-11-25 178 views
0

我試圖安裝this dashing widget,我得到以下錯誤,當我運行dashing start紅寶石請速錯誤

/var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:26:in `block (2 levels) in <top (required)>': undefined method `history' for Sinatra::Application:Class (NoMethodError) 

於是我去掉這個新的小工具(它在/部件目錄文件夾,其工作的各個方面。 rb文件和.erb文件中的代碼)。然而,這個錯誤仍然存​​在,我不再能夠啓動我的儀表板。這對我來說是個大問題。有人可以幫我嗎?

編輯:

完整的錯誤是

/var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:26:in `block (2 levels) in <top (required)>': undefined method `history' for Sinatra::Application:Class (NoMethodError) 
     from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:25:in `open' 
     from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:25:in `block in <top (required)>' 
/usr/lib/ruby/1.9.1/psych.rb:203:in `parse': (history.yml): control characters are not allowed at line 1 column 1 (Psych::SyntaxError) 
     from /usr/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' 
     from /usr/lib/ruby/1.9.1/psych.rb:151:in `parse' 
     from /usr/lib/ruby/1.9.1/psych.rb:127:in `load' 
     from /usr/lib/ruby/1.9.1/psych.rb:297:in `block in load_file' 
     from /usr/lib/ruby/1.9.1/psych.rb:297:in `open' 
     from /usr/lib/ruby/1.9.1/psych.rb:297:in `load_file' 
     from /var/lib/gems/1.9.1/gems/dashing-1.3.1/lib/dashing.rb:31:in `<top (required)>' 
     from config.ru:2:in `require' 
     from config.ru:2:in `block in <main>' 
     from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval' 
     from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize' 
     from config.ru:1:in `new' 
     from config.ru:1:in `<main>' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!' 
     from /var/lib/gems/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>' 
     from /usr/local/bin/thin:23:in `load' 
     from /usr/local/bin/thin:23:in `<main>' 
+0

檢查堆棧跟蹤,而不僅僅是這一行,看看它被調用的地方。 – tadman

+0

我已經包含完整的錯誤信息 – user1893354

+0

它看起來像我的psych.rb文件有一個問題 – user1893354

回答

1

我通過重命名舊的歷史文件

mv history.yml history 

,然後重新啓動服務器解決了這個問題。在我的情況下,這是

rackup -p 3030 -s puma 

history.yml文件直到我停止服務器後才重新出現。我用納米檢查過,裏面充滿了數據。 對不起,我不能說明爲什麼它可能發生。 服務器的詳細信息。 Ubuntu 13.10 32位桌面

+0

今天我發現history.yml出現問題的一個可能原因是在Dashing正在運行時關閉一個SSH連接(Windows bluescreened on me,所以這不是我的錯!)。 爲了避免啓動守護程序開關 'rackup -p 3030 -s puma -D' ,因爲這會在美洲獅開始啓動後返回提示。 當您測試作業時不太有用,但它確實解釋了問題 –