0

应用程序错误 应用程序发生错误,无法提供您的页面。请稍后重试。

如果您是应用程序所有者,请查看您的日志以获取详细信息。

$ heroku logs

2012-05-22T17:59:46+00:00 app[web.1]: => Call with -d to detach
2012-05-22T17:59:46+00:00 app[web.1]: Exiting
2012-05-22T17:59:46+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:313:in `depend_on'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-05-22T17:59:46+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]:   from script/rails:6:in `require'
2012-05-22T17:59:46+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-05-22T17:59:47+00:00 heroku[web.1]: Process exited with status 

2012-05-22T17:59:47+00:00 heroku[web.1]: State changed from starting to crashed
2012-05-22T18:11:00+00:00 heroku[web.1]: State changed from crashed to created
2012-05-22T18:11:00+00:00 heroku[web.1]: State changed from created to starting
2012-05-22T18:11:03+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 47802`
2012-05-22T18:11:07+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-22T18:11:07+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-22T18:11:11+00:00 app[web.1]: => Booting WEBrick
2012-05-22T18:11:11+00:00 app[web.1]: => Rails 3.2.1 application starting in production on http://0.0.0.0:47802
2012-05-22T18:11:11+00:00 app[web.1]: => Call with -d to detach
2012-05-22T18:11:11+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-05-22T18:11:11+00:00 app[web.1]: Exiting
2012-05-22T18:11:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:313:in `depend_on'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+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-05-22T18:11:11+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-05-22T18:11:11+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-05-22T18:11:11+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]:   from script/rails:6:in `require'
2012-05-22T18:11:11+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-05-22T18:11:13+00:00 heroku[web.1]: Process exited with status 1
2012-05-22T18:11:13+00:00 heroku[web.1]: State changed from starting to crashed

根据我所阅读的内容: Heroku中的应用程序错误 Heroku Rails上的应用程序错误 Heroku 应用程序错误

除了一些关于 pg gem 和 postgres 的模糊建议外,这个问题没有解决方案。

我的 gemfile 和 sqlite3 中只有 pg 用于开发:

source 'https://rubygems.org'

gem 'rails', '3.2.1'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.5'


group :production do
gem 'pg', '0.12.2'
end

group :development, :test do
  gem 'sqlite3', '1.3.5'
gem 'taps'
  gem 'annotate', '~> 2.4.1.beta'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.0'

group :test, :development do
  gem 'rspec-rails', '~> 2.8.rc'
  gem 'guard-rspec', '0.5.5'
  gem 'guard-spork', '0.3.2'
  gem 'spork', '0.9.0'
end

group :test do
  gem 'capybara', '1.1.2'
  gem 'factory_girl_rails', '1.4.0'
  gem 'cucumber-rails', '1.2.1'
  gem 'database_cleaner', '0.7.0'
end

#Nifty Scaffold

gem 'nifty-generators', :group => :development

# Location - Geocoder

gem 'geocoder'


gem "mocha", :group => :test

尽管如此,应用程序仍然崩溃(根据日志)并在呈现站点时给出应用程序错误。在本地服务器上一切正常,所以这绝对是一个部署问题。有谁知道出了什么问题?

谢谢

4

1 回答 1

2
/app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)

有你的错误。重新阅读您的评论控制器,文件中有明显的语法错误。

于 2012-05-22T18:22:19.450 回答