0
我今天上傳了一個應用程序到Heroku上,看到這個錯誤:應用程序錯誤heroku上的應用程序錯誤
應用程序發生錯誤,您的頁面無法送達。請稍後重試。
如果您是應用程序所有者,請查看您的日誌以瞭解詳細信息。
這個應用程序在當地工作。這是我的日誌。任何人有任何想法?
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/engine.rb:436:in `each'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/initializable.rb:54:in `each'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
2012-07-19T15:36:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actives
upport-3.2.6/lib/active_support/dependencies.rb:251:in `require': /app/app/contr
ollers/comments_controller.rb:9: syntax error, unexpected $end, expecting keywor
d_end (SyntaxError)
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:313:in `depend_on'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-07-19T15:36:53+00:00 app[web.1]: from config.ru:1:in `new'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.6/lib/active_support/dependencies.rb:225:in `require_dependenc
y'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/engine.rb:438:in `block in eager_load!'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-07-19T15:36:53+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/rack/adapter/loader.rb:33:in `eval'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/engine.rb:438:in `each'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/application/finisher.rb:53:in `block in <module:Finishe
r>'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/initializable.rb:30:in `run'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/engine.rb:436:in `eager_load!'
2012-07-19T15:36:53+00:00 app[web.1]: from config.ru:3:in `require'
2012-07-19T15:36:53+00:00 app[web.1]: from config.ru:1:in `<main>'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/rack/adapter/loader.rb:33:in `load'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/t
hin:19:in `load'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/thin/controllers/controller.rb:71:in `start'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/bin/thin:6:in `<top (required)>'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/config/environment.rb:5:in `<t
op (required)>'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/
thin-1.4.1/lib/thin/runner.rb:151:in `run!'
2012-07-19T15:36:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/t
hin:19:in `<main>'
2012-07-19T15:36:54+00:00 heroku[web.1]: Process exited with status 1
2012-07-19T15:36:54+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-19T15:36:57+00:00 heroku[router]: Error H10 (App crashed) -> GET secret-
reaches-4317.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-19T15:36:57+00:00 heroku[router]: Error H10 (App crashed) -> GET secret-
reaches-4317.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes
我控制器代碼
class CommentsController < ApplicationController
http_basic_authenticate_with :name => "test", :password => "test", :only => :destroy
def create
@post = Post.find(params[:post_id])
@comment = @post.comments.create(params[:comment])
redirect_to post_path(@post)
end
def destroy
@post = Post.find(params[:post_id])
@comment = @post.comments.find(params[:id])
@comment.destroy
redirect_to post_path(@post)
end
end
有在您的意見控制器語法錯誤。請提供您的'comments_controller'代碼 – uday 2012-07-19 17:54:20
我們可以使用您的comments_controller代碼嗎? – Dougui 2012-07-19 17:55:55
當然。這是我的代碼。 – 2012-07-19 17:58:13