0

我已经将我的应用程序推送到 heroku 并运行 rake db:migrate 没有问题然后当我输入 heroku open 时我收到应用程序错误消息,这里是 heroku 的日志

2013-09-17T05:57:36.454255+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by darkbrotherhood.assassin@gmail.com
2013-09-17T05:57:38.047530+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:1153:in `exec': PG::Error: ERROR:  relation "tickets" does not exist (ActiveRecord::StatementInvalid)
2013-09-17T05:57:38.047530+00:00 app[web.1]: LINE 5:              WHERE a.attrelid = '"tickets"'::regclass
2013-09-17T05:57:38.047530+00:00 app[web.1]:                                         ^
2013-09-17T05:57:38.047530+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2013-09-17T05:57:38.047530+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2013-09-17T05:57:38.047530+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-09-17T05:57:38.047530+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-09-17T05:57:38.047530+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2013-09-17T05:57:38.047530+00:00 app[web.1]:              WHERE a.attrelid = '"tickets"'::regclass
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:1153:in `exec_no_cache'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:662:in `block in exec_query'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
2013-09-17T05:57:38.047530+00:00 app[web.1]:              ORDER BY a.attnum
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `exec_query'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:228:in `columns'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:1278:in `column_definitions'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:857:in `columns'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
2013-09-17T05:57:38.047727+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:228:in `yield'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:228:in `default'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:237:in `columns_hash'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/locking/optimistic.rb:129:in `locking_enabled?'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:160:in `block in to_a'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:170:in `exec_queries'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/explain.rb:40:in `logging_query_plan'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:159:in `to_a'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation/finder_methods.rb:159:in `all'
2013-09-17T05:57:38.047874+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/querying.rb:5:in `all'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/app/models/ticket.rb:52:in `<class:Ticket>'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/app/models/ticket.rb:1:in `<top (required)>'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:260:in `safe_constantize'
2013-09-17T05:57:38.048292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:229:in `each'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
2013-09-17T05:57:38.048441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/app/controllers/tickets_controller.rb:1:in `<top (required)>'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:313:in `depend_on'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-09-17T05:57:38.048714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
2013-09-17T05:57:38.048853+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from config.ru:1:in `<main>'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from config.ru:3:in `require'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-09-17T05:57:38.049100+00:00 app[web.1]:    from config.ru:1:in `new'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-09-17T05:57:38.049242+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-09-17T05:57:39.154755+00:00 heroku[web.1]: Process exited with status 1
2013-09-17T05:57:39.163867+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-17T05:57:42.367168+00:00 heroku[run.8350]: Awaiting client
2013-09-17T05:57:42.387694+00:00 heroku[run.8350]: Starting process with command `bundle exec rake db:migrate`
2013-09-17T05:57:43.822030+00:00 heroku[run.8350]: State changed from starting to up
2013-09-17T05:57:57.126537+00:00 heroku[run.8350]: Process exited with status 0
2013-09-17T05:57:57.148289+00:00 heroku[run.8350]: State changed from up to complete
2013-09-17T05:58:09.700142+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=intense-river-8602.herokuapp.com fwd="197.163.97.240" dyno= connect= service= status=503 bytes=
2013-09-17T05:58:10.967355+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=intense-river-8602.herokuapp.com fwd="197.163.97.240" dyno= connect= service= status=503 bytes=
2013-09-17T05:58:29.705467+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=intense-river-8602.herokuapp.com fwd="197.163.97.240" dyno= connect= service= status=503 bytes=
2013-09-17T05:59:58.590498+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=intense-river-8602.herokuapp.com fwd="197.163.97.240" dyno= connect= service= status=503 bytes=
4

1 回答 1

0

更改config.serve_static_assets = falseconfig.serve_static_assets = trueproduction.rb 后解决,然后再次推送到 heroku

于 2013-09-17T08:39:48.737 回答