0

私は最近、彼らのガイドを使って最初のアプリを heroku にプッシュしました。(https://devcenter.heroku.com/articles/rails3) プッシュを考えると、すべてうまくいきました。アプリにアクセスして登録しようとすると、登録またはログインを試みるたびに、パブリック フォルダーからエラー 500 ページが表示されます。

アプリは現在、私の宝石の依存関係のみで構成されています。

gem 'devise'
gem 'haml'
gem 'cancan'
gem 'easy_roles'
gem 'paperclip'
gem 'therubyracer'
gem 'activeadmin'
gem 'formtastic'

heroku ログを取得した場合:

2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/validations.rb:50:in `save'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/attribute_methods/dirty.rb:22:in `save'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
2012-04-26T16:03:15+00:00 heroku[router]: POST cold-mist-6471.herokuapp.com/users/sign_in dyno=web.1 queue=0 wait=0ms service=224ms status=500 bytes=643
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/models/trackable.rb:26:in `update_tracked_fields!'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:190:in `transaction'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:208:in `transaction'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:241:in `block in save'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/transactions.rb:240:in `save'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/hooks/trackable.rb:7:in `block in <top (required)>'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/hooks.rb:14:in `block in _run_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/hooks.rb:9:in `each'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/hooks.rb:9:in `_run_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/proxy.rb:113:in `authenticate!'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/proxy.rb:165:in `set_user'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/proxy.rb:298:in `_perform_authentication'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/app/controllers/devise/sessions_controller.rb:14:in `create'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/hooks.rb:14:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb:53:in `_run_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/base.rb:167:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:447:in `_run__77755734840326551__process_action__4521632167829203251__callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/callbacks.rb:17:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/notifications.rb:123:in `instrument'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/notifications.rb:123:in `block in instrument'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/base.rb:121:in `process'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/rack_delegation.rb:14:in `dispat

2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/rendering.rb:45:in `process'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:66:in `dispatch'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal.rb:203:in `dispatch'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal.rb:246:in `block in action'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:66:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:30:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/mapper.rb:40:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/routing/route_set.rb:589:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/sass-3.1.16/lib/sass/plugin/rack.rb:54:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb:34:in `catch'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb:35:in `block in call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb:34:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/head.rb:14:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/query_cache.rb:64:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/cookies.rb:338:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/flash.rb:242:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:16:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `_run__4075917817454350211__call__1038533202048283850__callbacks'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
2012-04-26T16:03:15+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
2012-04-26T16:03:15+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
2012-04-26T16:03:15+00:00 app[web.1]: cache: [POST /users/sign_in] invalidate, pass
2012-04-26T16:03:15+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
2012-04-26T16:03:15+00:00 app[web.1]: 
2012-04-26T16:03:15+00:00 app[web.1]: 
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call'
2012-04-26T16:03:15+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:14:in `call'

なぜこれが機能しないのか、私にはまったくわかりません...

ローカルはすべて問題ありません。

4

2 に答える 2

1

heroku のデータベースをまだ移行していないようです。

試す:

heroku run rake db:migrate
于 2012-04-27T06:14:32.460 に答える
0

よし、見つけた。

新しく追加された列に役割を書き込んでいました。それは意図したとおりに機能しませんでした。

于 2012-04-27T13:57:22.103 に答える