2013-03-09 126 views
0

我剛剛部署了一個(以前的工作)Rails應用程序Heroku。問題是,無論何時我去URL,都會因爲應用程序錯誤而失敗。我真的不知道該怎麼做;大部分類似的錯誤都是關於sqlite3的,但已經從應用中刪除了。我不確定除此之外,還有什麼建議?New Rails Heroku應用程序拋出ApplicationError(Heroku錯誤H10)

←[32m2013-03-09T21:57:55+00:00 heroku[run.5406]:←[0m State changed from up to co 
mplete 
←[35m2013-03-09T21:57:58+00:00 heroku[router]:←[0m at=error code=H10 desc="App c 
rashed" method=GET path=/ host=myapp.herokuapp.com fwd="12.13.14.15, 99.249.8 
.176" dyno= queue= wait= connect= service= status=503 bytes= 
←[35m2013-03-09T21:57:58+00:00 heroku[router]:←[0m at=error code=H10 desc="App c 
rashed" method=GET path=/ host=myapp.herokuapp.com fwd="12.13.14.15, 99.249.8 
.176" dyno= queue= wait= connect= service= status=503 bytes= 
←[35m2013-03-09T21:57:58+00:00 heroku[router]:←[0m at=error code=H10 desc="App c 
rashed" method=GET path=/favicon.ico host=myapp.herokuapp.com fwd="12.13.14.1 
5, 99.249.8.176" dyno= queue= wait= connect= service= status=503 bytes= 
←[35m2013-03-09T21:57:59+00:00 heroku[router]:←[0m at=error code=H10 desc="App c 
rashed" method=GET path=/ host=myapp.herokuapp.com fwd="12.13.14.15, 99.249.8 
.176" dyno= queue= wait= connect= service= status=503 bytes= 
←[36m2013-03-09T21:58:22+00:00 heroku[web.1]:←[0m State changed from crashed to 
starting 
←[36m2013-03-09T21:58:23+00:00 heroku[web.1]:←[0m Starting process with command 
`bundle exec rails server -p 22371` 
←[36m2013-03-09T21:58:27+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rai 
ls 2.3-style plugins in vendor/plugins! Support for these plugins will be remove 
d in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in t 
o your app as lib/myplugin/* and config/initializers/myplugin.rb. See the releas 
e notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2 
-has-been-released. (called from <top (required)> at /app/config/environment.rb: 
5) 
←[36m2013-03-09T21:58:27+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rai 
ls 2.3-style plugins in vendor/plugins! Support for these plugins will be remove 
d in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in t 
o your app as lib/myplugin/* and config/initializers/myplugin.rb. See the releas 
e notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2 
-has-been-released. (called from <top (required)> at /app/config/environment.rb: 
5) 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m => Rails 3.2.11 application start 
ing in production on http://0.0.0.0:22371 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m => Call with -d to detach 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m => Ctrl-C to shutdown server 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m => Booting WEBrick 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m Connecting to database specified 
by DATABASE_URL 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' 

←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m Exiting 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m /app/vendor/bundle/ruby/1.9.1/gem 
s/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require': /app 
/app/models/message.rb:8: syntax error, unexpected tASSOC (SyntaxError) 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m validates :content, :length => 
{ maximum: => 200 } 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m 
      ^
2013-03-09T21:58:29+00:00 app 
←[36m[web.1]:←[0m  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3. 
2.11/lib/active_support/dependencies.rb:251:in `block in require' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dep 
endency' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:313:in `depend_o 
n' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:359:in `require_ 
or_load' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/engine.rb:439:in `block (2 levels) in eager_lo 
ad!' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/engine.rb:438:in `each' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/application/finisher.rb:53:in `block in <modul 
e:Finisher>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/engine.rb:438:in `block in eager_load!' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializ 
ers' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/engine.rb:436:in `eager_load!' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/engine.rb:436:in `each' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/config/environment.rb: 
5:in `<top (required)>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/config.ru:3:in `requir 
e' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/config.ru:3:in `block 
in <main>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:225:in `require_ 
dependency' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing' 

←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/config.ru:in `new' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/config.ru:in `<main>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in `start' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9 
.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>' 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from script/rails:6:in `require' 

←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m from script/rails:6:in `<main>' 
←[36m2013-03-09T21:58:31+00:00 heroku[web.1]:←[0m Process exited with status 1 
←[36m2013-03-09T21:58:31+00:00 heroku[web.1]:←[0m State changed from starting to 
crashed 
←[35m2013-03-09T21:58:32+00:00 heroku[router]:←[0m at=error code=H10 desc="App c 
rashed" method=GET path=/favicon.ico host=myapp.herokuapp.com fwd="12.13.14.1 
5, 99.249.8.176" dyno= queue= wait= connect= service= status=503 bytes= 

回答

1

您的Message模型出現錯誤。

validates :content, :length => { maximum: => 200 } 

必須

validates :content, :length => { :maximum => 200 } 
0

看起來你的消息模型中有一個語法錯誤,根據錯誤消息中的這一行。 Heroku很可能試圖構建你的應用程序,當它遇到這個錯誤時它崩潰。

/app/models/message.rb:8: syntax error, unexpected tASSOC (SyntaxError) 
←[36m2013-03-09T21:58:29+00:00 app[web.1]:←[0m validates :content, :length => 
{ maximum: => 200 }