2012-01-11 36 views
1

私はこの数日間、RubyとRoRを学んできました。私はちょうど私の開発マシン上にダミーのアプリケーションを完了し、それは完全に動作しています。それをHerokuにプッシュした後、アプリがクラッシュします。デプロイメント後にHerokuアプリがクラッシュする

数日前に始まったので、私はほとんどRubyとRoRを知っていません。なぜエラーが起きているのか把握するのは少し怖いです。何か案は?私はHerokuにプッシュして道のすべてのステップでテストすべきだったが、あなたは生きていると思う。

C:\dev\rails\cdl>heroku logs 
2012-01-11T17:47:20+00:00 heroku[web.1]: Process exited 
2012-01-11T17:47:23+00:00 heroku[web.1]: Starting process with command `thin -p 54920 -e production 
roku.ru start` 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/li 
ion_adapters/abstract/connection_specification.rb:68:in `establish_connection' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/li 
ion_adapters/abstract/connection_specification.rb:60:in `establish_connection' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/li 
ion_adapters/abstract/connection_specification.rb:55:in `establish_connection' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/li 
.rb:69:in `block (2 levels) in <class:Railtie>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
load_hooks.rb:36:in `instance_eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
load_hooks.rb:43:in `block in run_load_hooks' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
load_hooks.rb:42:in `each' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
load_hooks.rb:42:in `run_load_hooks' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/li 
:2190:in `<top (required)>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/app/models/list.rb:1:in `<top (required)>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `block in require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
load_hooks.rb:36:in `execute_hook' 
2012-01-11T17:47:27+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/activ 
pters/abstract/connection_specification.rb:71:in `rescue in establish_connection': Please install th 
gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (Run 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:225:in `load_dependency' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:348:in `require_or_load' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:489:in `load_missing_constant' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:181:in `block in const_missing' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:179:in `each' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:179:in `const_missing' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
ctor/methods.rb:124:in `block in constantize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
ctor/methods.rb:123:in `each' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
ctor/methods.rb:123:in `constantize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
ext/string/inflections.rb:43:in `constantize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/ 
/para 
ms_wrapper.rb:167:in `_set_wrapper_defaults' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/ 
lties/routes_helpers.rb:7:in `block (2 levels) in with' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/ 
ies/paths.rb:7:in `block (2 levels) in with' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/app/controllers/lists_controller.rb:1:in `<top (re 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `block in require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/ 
/params_wrapper.rb:148:in `_default_wrap_model' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:225:in `load_dependency' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:240:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:348:in `require_or_load' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/ 
/params_wrapper.rb:128:in `inherited' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:214:in `require_dependency' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
lock (2 levels) in eager_load!' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
ach' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
lock in eager_load!' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
ach' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
ager_load!' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
:in `instance_exec' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
:in `run' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
:in `block in run_initializers' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
:in `each' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
:in `run_initializers' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
n `initialize!' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
e.rb:30:in `method_missing' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>' 
2012-01-11T17:47:27+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/ra 
r.rb:51:in `block in <module:Finisher>' 

2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/l 
dencies.rb:302:in `depend_on' 
2012-01-11T17:47:27+00:00 app[web.1]: from config.ru:3:in `block (3 levels) in <main>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
ce_eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
lize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
ce_eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
lize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `new' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
ce_eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 
36:in `eval' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 
ller.rb:175:in `load_rackup_config' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 
run_command' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/ 
ed)>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/b 
lize' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 
ller.rb:65:in `start' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2012-01-11T17:47:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<main>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 

run!' 
2012-01-11T17:47:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/ 
36:in `load' 
2012-01-11T17:47:28+00:00 heroku[web.1]: State changed from starting to crashed 
2012-01-11T17:47:29+00:00 heroku[web.1]: Process exited 
2012-01-11T17:48:13+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:48:13+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:48:24+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:48:24+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:48:54+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:48:54+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:50:24+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:50:24+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:50:25+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:50:25+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:50:27+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:50:28+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:56:57+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
service= status=503 bytes= 
2012-01-11T17:56:58+00:00 heroku[router]: Error H10 (App crashed) -> GET electric-moon-9885.heroku.c 
eue= wait= service= status=503 bytes= 
2012-01-11T17:57:37+00:00 heroku[web.1]: State changed from crashed to created 
2012-01-11T17:57:37+00:00 heroku[web.1]: State changed from created to starting 
2012-01-11T17:57:44+00:00 heroku[web.1]: State changed from starting to crashed 

答えて

2

ログファイルを詳しく見てください。この行があります:

Please install the 
gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to  Gemfile.) 

基本的に、あなたはそれをサポートしていないsqlite3のサーバー、とHerokuのインスタンスを実行しようとしている(最も可能性が高いです)。あなたのgemfileでは、次を配置する必要があります。

group :development, :test do 
    gem 'sqlite3' 
end 

group :production do 
    gem 'pg' 
end 

rebundle、コミットとHerokuのにrepush、あなたは問題ないはずです。

+0

うわー、素敵な抽出作業は、その情報を取得! – culix

関連する問題