2016-08-27 23 views
0

私は狂った瞬間、Deviseの宝石とOmniauthを使ったRails 5アプリを作ることにしました。すべてが開発環境で動作するように見えるが(私はそこから電子メールを送信するように設定していないが...キュークは通り過ぎている!= D)、私はHerokuにプッシュして移行するとき(そして私がdyno )、私は有効な電子メールとパスワード(またはomniauth経由でログインすることはできませんが、それは期待されていました)にサインアップしようとすると、アカウントは作成されますが、認証メールは送信されません。私は確認メールを再送することができず、ヘルオクのレールコンソールを介して既存のアカウントを確認しようとしたとき、アプリの忘れたパスワードリンクを使用してアカウントのパスワードをリセットできませんでした。私が何をするにしても、私はログをチェックするように私に助言するジェネリック500のエラーを受け取ります。私が知る限り、問題はDeviseまたはActionMailerのサイトの残りの部分が正しく読み込まれているようです。Devilsの宝石でHerokuのRails 5アプリにログインできない

私は、以下のページで私のGmailの設定を変更しようとした:

Display Unlock Captcha

Less Secure Apps (which I haven't had to use for my Rails 4 apps recently)

私は設定ファイルに様々な調整を行うことを試みたと、このようなこれまでのところ、何も働いていたんです。 (私はサイトからパスワードを忘れた場合の電子メールを送信しようとしたときから)

Herokuののログ

2016-08-27T08:22:49.275213+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:232:in `block in conditional' 
2016-08-27T08:22:49.275273+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `block in call' 
2016-08-27T08:22:49.275332+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `call' 
2016-08-27T08:22:49.275302+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `each' 
2016-08-27T08:22:49.275656+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:334:in `rollback_active_record_state!' 
2016-08-27T08:22:49.275713+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/suppressor.rb:41:in `save' 
2016-08-27T08:22:49.275774+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/bundler/gems/devise-4c3838bb759e/lib/devise/models/recoverable.rb:45:in `send_reset_password_instructions' 
2016-08-27T08:22:49.275362+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__' 
2016-08-27T08:22:49.275509+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:202:in `within_new_transaction' 
2016-08-27T08:22:49.275391+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_commit_callbacks' 
2016-08-27T08:22:49.275155+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:382:in `block in make_lambda' 
2016-08-27T08:22:49.275420+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:354:in `committed!' 
2016-08-27T08:22:49.275451+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:87:in `commit_records' 
2016-08-27T08:22:49.275684+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:318:in `save' 
2016-08-27T08:22:49.276127+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__' 
2016-08-27T08:22:49.276268+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' 
2016-08-27T08:22:49.275479+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:178:in `commit_transaction' 
2016-08-27T08:22:49.276857+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:262:in `dispatch' 
2016-08-27T08:22:49.276997+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/mapper.rb:46:in `serve' 
2016-08-27T08:22:49.275241+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `call' 
2016-08-27T08:22:49.277110+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:725:in `call' 
2016-08-27T08:22:49.277194+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!' 
2016-08-27T08:22:49.277251+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!' 
2016-08-27T08:22:49.277279+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call' 
2016-08-27T08:22:49.277307+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call' 
2016-08-27T08:22:49.277447+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/head.rb:12:in `call' 
2016-08-27T08:22:49.277630+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_call_callbacks' 
2016-08-27T08:22:49.277658+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' 
2016-08-27T08:22:49.277856+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/tagged_logging.rb:70:in `block in tagged' 
2016-08-27T08:22:49.278095+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' 
2016-08-27T08:22:49.275538+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction' 
2016-08-27T08:22:49.275567+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:211:in `transaction' 
2016-08-27T08:22:49.275597+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:392:in `with_transaction_returning_status' 
2016-08-27T08:22:49.275859+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' 
2016-08-27T08:22:49.275927+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action' 
2016-08-27T08:22:49.276069+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call' 
2016-08-27T08:22:49.276211+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:19:in `process_action' 
2016-08-27T08:22:49.276296+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument' 
2016-08-27T08:22:49.276800+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionview-5.0.0.1/lib/action_view/rendering.rb:30:in `process' 
2016-08-27T08:22:49.277223+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call' 
2016-08-27T08:22:49.277587+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:97:in `__run_callbacks__' 
2016-08-27T08:22:49.277799+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:36:in `call_app' 
2016-08-27T08:22:49.278008+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' 
2016-08-27T08:22:49.278133+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/static.rb:136:in `call' 
2016-08-27T08:22:49.275626+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/transactions.rb:319:in `block in save' 
2016-08-27T08:22:49.275743+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/bundler/gems/devise-4c3838bb759e/lib/devise/models/recoverable.rb:88:in `set_reset_password_token' 
2016-08-27T08:22:49.275802+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/bundler/gems/devise-4c3838bb759e/lib/devise/models/recoverable.rb:119:in `send_reset_password_instructions' 
2016-08-27T08:22:49.275901+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:188:in `process_action' 
2016-08-27T08:22:49.275956+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action' 
2016-08-27T08:22:49.275984+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call' 
2016-08-27T08:22:49.276012+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call' 
2016-08-27T08:22:49.276041+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' 
2016-08-27T08:22:49.276466+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action' 
2016-08-27T08:22:49.277082+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `serve' 
2016-08-27T08:22:49.277532+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/cookies.rb:613:in `call' 
2016-08-27T08:22:49.277714+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' 
2016-08-27T08:22:49.278038+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' 
2016-08-27T08:22:49.276098+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call' 
2016-08-27T08:22:49.276381+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action' 
2016-08-27T08:22:49.276885+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch' 
2016-08-27T08:22:49.277504+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:216:in `call' 
2016-08-27T08:22:49.278267+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/server.rb:415:in `process_client' 
2016-08-27T08:22:49.276155+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' 
2016-08-27T08:22:49.276239+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/rescue.rb:20:in `process_action' 
2016-08-27T08:22:49.276437+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/searchkick-1.3.3/lib/searchkick/logging.rb:153:in `process_action' 
2016-08-27T08:22:49.277025+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:39:in `block in serve' 
2016-08-27T08:22:49.277391+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/etag.rb:25:in `call' 
2016-08-27T08:22:49.277884+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/tagged_logging.rb:26:in `tagged' 
2016-08-27T08:22:49.278352+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/thread_pool.rb:116:in `block in spawn_thread' 
2016-08-27T08:22:49.276324+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument' 
2016-08-27T08:22:49.276352+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument' 
2016-08-27T08:22:49.276913+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:32:in `serve' 
2016-08-27T08:22:49.276969+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/mapper.rb:46:in `call' 
2016-08-27T08:22:49.277743+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' 
2016-08-27T08:22:49.277828+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:24:in `block in call' 
2016-08-27T08:22:49.277914+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/tagged_logging.rb:70:in `tagged' 
2016-08-27T08:22:49.277980+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' 
2016-08-27T08:22:49.278239+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/server.rb:578:in `handle_request' 
2016-08-27T08:22:49.276409+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/params_wrapper.rb:248:in `process_action' 
2016-08-27T08:22:49.277560+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' 
2016-08-27T08:22:49.277686+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:36:in `call' 
2016-08-27T08:22:49.277167+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call' 
2016-08-27T08:22:49.277336+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch' 
2016-08-27T08:22:49.277953+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:24:in `call' 
2016-08-27T08:22:49.275829+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/bundler/gems/devise-4c3838bb759e/app/controllers/devise/passwords_controller.rb:13:in `create' 
2016-08-27T08:22:49.276184+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' 
2016-08-27T08:22:49.277054+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `each' 
2016-08-27T08:22:49.277139+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!' 
2016-08-27T08:22:49.277419+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/conditional_get.rb:38:in `call' 
2016-08-27T08:22:49.276773+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:126:in `process' 
2016-08-27T08:22:49.276828+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:190:in `dispatch' 
2016-08-27T08:22:49.276941+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/mapper.rb:16:in `block in <class:Constraints>' 
2016-08-27T08:22:49.277364+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call' 
2016-08-27T08:22:49.277475+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:222:in `context' 
2016-08-27T08:22:49.277771+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' 
2016-08-27T08:22:49.278067+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' 
2016-08-27T08:22:49.278154+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' 
2016-08-27T08:22:49.278184+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:522:in `call' 
2016-08-27T08:22:49.278211+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/configuration.rb:225:in `call' 
2016-08-27T08:22:49.278324+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/thread_pool.rb:116:in `call' 
2016-08-27T08:22:49.278296+00:00 app[web.1]: [0635e4c5-2a5f-467e-b067-a9906868f73d] vendor/bundle/ruby/2.2.0/gems/puma-3.6.0/lib/puma/server.rb:275:in `block in run' 

私の現在のGemfile

source 'https://rubygems.org' 

gem 'rails', '~> 5.0.0', '>= 5.0.0.1' 
gem 'pg', '~> 0.18' 
gem 'puma', '~> 3.0' 
gem 'sass-rails', '~> 5.0' 
gem 'uglifier', '>= 1.3.0' 
gem 'jbuilder', '~> 2.5' 
# Use Redis adapter to run Action Cable in production 
gem 'redis', '~> 3.0' 
# Use ActiveModel has_secure_password 
gem 'bcrypt', '~> 3.1.7' 
gem 'jquery-rails' 
gem 'sprockets', '>=3.0.0.beta' 
#gem 'sprockets-es6' 
gem 'haml' 
gem 'nokogiri' 
gem 'devise', git: 'https://github.com/plataformatec/devise.git', branch: 'master' 
gem 'omniauth' 
gem 'omniauth-facebook' 
gem 'omniauth-twitter' 
gem 'omniauth-instagram' 
gem 'cancancan' 
gem 'figaro' 
gem 'humanize_boolean' 
gem 'carrierwave', git: 'https://github.com/carrierwaveuploader/carrierwave' 
gem 'mini_magick', '~> 3.8.0' 
gem 'fog' 
gem 'geocoder' 
gem 'elasticsearch-model', git: 'https://github.com/elasticsearch/elasticsearch-rails.git' 
gem 'elasticsearch-rails', git: 'https://github.com/elasticsearch/elasticsearch-rails.git' 
gem 'searchkick' 
gem 'cocoon' 
gem 'owlcarousel-rails' 

# Use Capistrano for deployment 
gem 'capistrano-rails', group: :development 

group :test do 
    gem 'selenium-webdriver' 
end 

group :development, :test do 
    gem 'pry-byebug', platform: :mri 
    gem 'rspec-rails' 
    gem 'simplecov' 
    gem 'factory_girl_rails' 
    gem 'launchy' 
    gem 'cucumber-rails', :require => false 
    gem 'database_cleaner' 
    gem 'faker' 
    gem 'rails-controller-testing' 
    gem 'capybara' 
    gem 'jasmine' 
end 

group :development do 
    gem 'web-console' 
    gem 'listen', '~> 3.0.5' 
    gem 'spring' 
    gem 'spring-watcher-listen', '~> 2.0.0' 
end 

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

group :production do 
    gem 'rails_12factor' 
    gem 'aws-sdk' 
end 

設定/環境/ production.rb

Rails.application.configure do 
    config.cache_classes = true 

    config.eager_load = true 

    config.consider_all_requests_local  = false 
    config.action_controller.perform_caching = true 

    config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 

    config.assets.js_compressor = :uglifier 

    config.assets.compile = true 

    config.log_level = :debug 

    config.log_tags = [ :request_id ] 

    config.action_mailer.perform_caching = false 

    config.action_mailer.raise_delivery_errors = false 
    config.action_mailer.default_url_options = { 
    host: ENV["MAILER_HOST"], #Rails.application.secrets.mailer_host, 
    from: ENV["MAILER_FROM"]#Rails.application.secrets.mailer_from 
    } 
    Rails.application.routes.default_url_options[:host] = ENV["MAILER_HOST"]#Rails.application.secrets.mailer_host 

    config.action_mailer.delivery_method = :smtp 
    config.action_mailer.perform_deliveries = true 
    config.action_mailer.smtp_settings = { 
    address: "smtp.gmail.com", 
    port: 587, 
    domain: ENV["GMAIL_DOMAIN"],#Rails.application.secrets.gmail_domain, 
    authentication: :plain, 
    enable_starttls_auto: true, 
    user_name: ENV["GMAIL_USERNAME"],#Rails.application.secrets.gmail_username, 
    password: ENV["GMAIL_PASSWORD"]#Rails.application.secrets.gmail_password 
    } 


    config.i18n.fallbacks = true 

    config.active_support.deprecation = :notify 

    config.log_formatter = ActiveSupport::Logger::Formatter.new 

    # require 'syslog/logger' 
    # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 

    if ENV["RAILS_LOG_TO_STDOUT"].present? 
    logger   = ActiveSupport::Logger.new(STDOUT) 
    logger.formatter = config.log_formatter 
    config.logger = ActiveSupport::TaggedLogging.new(logger) 
    end 

    config.active_record.dump_schema_after_migration = false 
    Elasticsearch::Model.client = Elasticsearch::Client.new host: ENV['SEARCHBOX_SSL_URL'] 
end 

私はもともと、シークレットファイル(環境変数名を含んでいて、Herokuの設定設定を参照しましたが、設定ファイル自体に直接変数を追加しようとしました)から環境変数にアクセスしようとしました。これらの新しい変化をHerokuに押し付けても、それほど大きな違いはありません。

設定/初期化子/ devise.rb

Devise.setup do |config| 
    config.mailer_sender = ENV["MAILER_FROM"] 
    config.mailer = 'Devise::Mailer' 
    config.parent_mailer = 'ActionMailer::Base' 
    require 'devise/orm/active_record' 
    config.authentication_keys = [:email] 
    config.strip_whitespace_keys = [:email] 
    config.http_authenticatable = false 
    config.skip_session_storage = [:http_auth] 
    config.stretches = Rails.env.test? ? 1 : 11 
    config.confirmation_keys = [:email] 
    config.password_length = 6..128 
    config.email_regexp = /\A[^@\s][email protected][^@\s]+\z/ 
    config.reset_password_within = 6.hours 
    config.sign_out_via = :delete 
    config.omniauth :twitter, ENV["TWITTER_APP_ID"], ENV["TWITTER_APP_SECRET"]# Rails.application.secrets.twitter_app_id, Rails.application.secrets.twitter_app_secret 
    config.omniauth :facebook, ENV["FACEBOOK_APP_ID"], ENV["FACEBOOK_APP_SECRET"]# Rails.application.secrets.facebook_app_id, Rails.application.secrets.facebook_app_secret 
    config.omniauth :instagram, ENV["INSTAGRAM_APP_ID"], ENV["INSTAGRAM_APP_SECRET"]# Rails.application.secrets.instagram_app_id, Rails.application.secrets.instagram_app_secret 
end 

工夫ルート

devise_scope :squatter do 
    devise_for :squatters, controllers: { 
     sessions: "squatters/sessions", 
     registrations: "squatters/registrations", 
     passwords: "squatters/passwords", 
     confirmations: "squatters/confirmations", 
     omniauth_callbacks: "squatters/omniauth_callbacks" 
    } 
    end 

    resources :squatters, only: [:index, :show] do 
    member do 
     get :submissions_pending_approval 
    end 
    resources :messages, except: [:destroy, :edit, :index] 
    end 

私は

devise :database_authenticatable, :registerable, 
     :recoverable, :rememberable, :trackable, :validatable, 
     :confirmable, :omniauthable, omniauth_providers: [:facebook, :twitter, :instagram] 
を使用しているモデルの考案の設定を

私のデベロッパーコントローラのほとんどは、彼らが継承したコントローラのスーパーを呼び出します。私が変えた唯一のものはOmniauthのものです。私はほとんどがちょうど複数のオムニバスのアイデンティティ(sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin)のチュートリアルに従っていたので、これは赤いニシンかもしれません。

class Squatters::OmniauthCallbacksController < Devise::OmniauthCallbacksController 
    def self.provides_callback_for(provider) 
    class_eval %Q{ 
     def #{provider} 
    @squatter = Squatter.find_for_oauth(env["omniauth.auth"], current_squatter) 

    if @squatter.persisted? 
     sign_in_and_redirect @squatter, event: :authentication 
     set_flash_message(:notice, :success, kind: "#{provider}".capitalize) if is_navigational_format? 
    else 
     session["devise.#{provider}_data"] = env["omniauth.auth"] 
     redirect_to new_squatter_registration_url 
    end 
     end 
    } 
    end 

    [:twitter, :facebook, :instagram].each do |provider| 
    provides_callback_for provider 
    end 

    def after_sign_in_path_for(resource) 
    if resource.email_verified? 
     super resource 
    else 
     finish_signup_path(resource) 
    end 
    end 
end 

先に述べたように、私はheroku run rake db:migrate --app my_apps_nameを実行しているとheroku restart --app my_apps_nameを実行してみた試してみました。誰かが私が逃したかもしれないものがあるのか​​、これが単に最新のDeviseのバグの存在を示しているのか知っていますか?

答えて

0

私のエラーは、HerokuのSearchboxアドオンの試用版で動作しないSearchkickの宝石によって引き起こされました。私は、Deviseのイニシャライザファイルにsecret_key_base環境変数を追加しようとしたときに気づいただけで、パスワードをリセットしようとしたときにHerokuのログに再インデックスエラーが表示され始めました。私のモデルのsearchkick行をコメントアウトすると問題が解決し、今すぐログインできます。& c。

0

設定/環境フォルダを確認しましたか?そこにproduction.rbとdevelopment.rbファイルがあります。あなたがdeviseをインストールしたときに、あなたのdevelopment.rbファイルにこのconfig.action_mailer.default_url_options = { host: 'localhost', port: 3000 }を含めるようにしました。これは、パスワード確認リンクとリセットパスワードリンクを送信するためのものです。 これをproduction.rbファイルに含めましたか?あなたがherokuでホスティングしている場合、それはあなたのアプリのリンクでなければなりません。

+0

お返事ありがとうございます。私はすでに私の質問にproduction.rbファイルを含んでいます(公平なラベルにはわずかなタイプミスがありますが、これは1分後に変更されます)。私のproduction.rbファイルには、gmailとactionmailerの設定が含まれており、関連する環境変数をHerokuに追加しました。サイトのURLをホストとして設定しました。私はまだ500のエラーを得ています。 – kohrVid

0

あなたのherokuアプリでこの設定を試してください。

config.action_mailer.default_url_options = { :host =>  'myapp.herokuapp.com' } 
config.action_mailer.delivery_method = :smtp 
config.action_mailer.perform_deliveries = true 
config.action_mailer.raise_delivery_errors = false 
config.action_mailer.default :charset => "utf-8" 
config.action_mailer.smtp_settings = { 
    address: "smtp.gmail.com", 
    port: 587, 
    domain: "myapp.herokuapp.com", 
    authentication: "plain", 
    enable_starttls_auto: true, 
    user_name: ENV["GMAIL_USERNAME"], 
    password: ENV["GMAIL_PASSWORD"] 
} 
+0

':from'キーと値のペアを' default_url_options'から削除し、デフォルトのcharsetを追加し、認証を '' plain "'に設定しました(それは '' plain''です)、herokuにプッシュしてdynoを再起動しました。私はまだ私が私のアプリで忘れたパスワードのリンクをクリックすると、以前に投稿したエラーメッセージが表示されます。 – kohrVid

関連する問題