2011-11-25 119 views
1

我有一個rails(2.3.5)應用程序,我不得不對它做一些更改,包括更改db。因此,本地工作正常,但是當我嘗試將其推送到heroku時,當我嘗試訪問應用程序時,我的瀏覽器上出現「應用程序錯誤」。我推送了新的代碼,引導並使用我的本地項目填充了heroku數據庫。Rails/heroku:如何使我的應用程序在heroku上工作

這就是我與「heroku日誌」,有什麼想法? :

C:\Sites\takenetqd>heroku logs 
2011-11-25T15:54:04+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T15:54:04+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes' 
2011-11-25T15:54:04+00:00 app[web.1]: ... 21 levels... 
2011-11-25T15:54:04+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-11-25T15:54:04+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-11-25T15:54:04+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2011-11-25T15:54:04+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-11-25T15:54:04+00:00 heroku[web.1]: Process exited 
2011-11-25T15:54:05+00:00 heroku[web.1]: State changed from starting to crashed 
2011-11-25T16:04:36+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:04:36+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T16:04:37+00:00 heroku[web.1]: Starting process with command `thin -p 50841 -e production -R /home/heroku_rack/heroku.ru start` 
2011-11-25T16:04:39+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/ 
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' 

2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_ 
or_load' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o 
n' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_ 
dependency' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes' 
2011-11-25T16:04:39+00:00 app[web.1]: ... 21 levels... 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-11-25T16:04:39+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-11-25T16:04:39+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2011-11-25T16:04:39+00:00 heroku[web.1]: Process exited 
2011-11-25T16:15:09+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:15:09+00:00 heroku[web.1]: State changed from created to s 
tarting 
2011-11-25T16:15:10+00:00 heroku[web.1]: Starting process with command `thin -p 53066 -e production -R /home/heroku_rack/heroku.ru start` 
2011-11-25T16:15:12+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/ 
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' 

2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_ 
or_load' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o 
n' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_ 
dependency' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes' 
2011-11-25T16:15:12+00:00 app[web.1]: ... 21 levels... 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-11-25T16:15:12+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-11-25T16:15:12+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2011-11-25T16:15:12+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-11-25T16:15:12+00:00 heroku[web.1]: Process exited 
2011-11-25T16:15:13+00:00 heroku[web.1]: State changed from starting to crashed 
2011-11-25T16:25:13+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:25:13+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T16:25:20+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/ 
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' 

2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2. 
3.5/lib/active_support/dependencies.rb:265:in `require_or_load' 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o 
n' 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_ 
dependency' 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes' 
2011-11-25T16:25:20+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T16:35:48+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:35:49+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T16:35:50+00:00 heroku[web.1]: Starting process with command `thin -p 38632 -e production -R /home/heroku_rack/heroku.ru start` 
2011-11-25T16:35:52+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/ 
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' 

2011 
-11-25T16:35:52+00:00 app[web.1]:  from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o 
n' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_ 
or_load' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_ 
dependency' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes' 
2011-11-25T16:35:52+00:00 app[web.1]: ... 21 levels... 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-11-25T16:35:52+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-11-25T16:35:52+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2011-11-25T16:35:52+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-11-25T16:35:52+00:00 heroku[web.1]: Process exited 
2011-11-25T16:35:53+00:00 heroku[web.1]: State changed from starting to crashed 
2011-11-25T16:46:58+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:46:58+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T16:47:00+00:00 heroku[web.1]: Starting process with command `thin -p 53480 -e production -R /home/heroku_rack/heroku.ru start` 
2011-11-25T16:47:03+00:00 heroku[web.1]: State changed from starting to crashed 
2011-11-25T16:57:38+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T16:57:38+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T16:57:43+00:00 heroku[web.1]: State changed from starting to crashed 
2011-11-25T17:07:44+00:00 heroku[web.1]: State changed from crashed to created 
2011-11-25T17:07:44+00:00 heroku[web.1]: State changed from created to starting 
2011-11-25T17:07:45+00:00 heroku[web.1]: Starting process with command `thin -p 6130 -e production -R /home/heroku_rack/heroku.ru start` 
2011-11-25T17:07:47+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/ 
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' 

2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_ 
or_load' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o 
n' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_ 
dependency' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes' 
2011-11-25T17:07:47+00:00 app[web.1]: ... 21 levels... 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-11-25T17:07:47+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-11-25T17:07:47+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2011-11-25T17:07:47+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-11-25T17:07:47+00:00 heroku[web.1]: Process exited 
2011-11-25T17:07:48+00:00 heroku[web.1]: State changed from starting to crashed 
+0

可以粘貼sms_controller.rb請的內容是什麼? – stephenmurdoch

回答

2

它看起來像有一個在你的控制器中的一個語法錯誤:

sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError) 
1

在您的SMS控制器看一看,確保每個def [1]與end封閉

日誌文件不一定非常令人生畏。請注意,關鍵信息是在應用程序創建並啓動後陳述的,因爲這是問題出現的地方,最重要的信息更接近頂端。之後的第一行指出語法錯誤。所有後續行都是錯誤,一旦頂部錯誤被修復,這些錯誤將會消失。

[1]不一定是def - 可能是一個塊,一個循環,迭代等

相關問題