我在我的应用程序上进行的更改很容易在我的localhost:3000中看到,但是,如果我通过链接(http://amanjotkaur-bloccit.herokuapp.com/)进行了更改,则注册或登录等操作无效。收到此消息错误:我们很抱歉,但出了点问题。如果您是应用程序所有者,请检查日志以获取更多信息。
我已经在流浪汉上运行了heroku日志,这就是我得到的:
2014-09-10T19:01:24.309885+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'
2014-09-10T19:01:24.309886+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
2014-09-10T19:01:24.309888+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/schema_statements.rb:187:in `columns'
2014-09-10T19:01:24.309891+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/schema_cache.rb:44:in `yield'
2014-09-10T19:01:24.309905+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2014-09-10T19:01:24.309909+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
2014-09-10T19:01:24.309911+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
2014-09-10T19:01:24.309914+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
2014-09-10T19:01:24.309922+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
2014-09-10T19:01:24.309906+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
2014-09-10T19:01:24.309908+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
2014-09-10T19:01:24.309913+00:00 app[web
.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
2014-09-10T19:01:24.309932+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
2014-09-10T19:01:24.309887+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:976:in `column_definitions'
2014-09-10T19:01:24.309893+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/schema_cache.rb:44:in `columns'
2014-09-10T19:01:24.309895+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/model_schema.rb:223:in `columns_hash'
2014-09-10T19:01:24.309907+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
2014-09-10T19:01:24.309912+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
2014-09-10T19:01:24.309918+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
2014-09-10T19:01:24.309925+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
2014-09-10T19:01:24.309927+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
2014-09-10T19:01:24.309930+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
2014-09-10T19:01:24.309936+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
2014-09-10T19:01:24.309955+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
2014-09-10T19:01:24.309894+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/model_schema.rb:214:in `columns'
2014-09-10T19:01:24.309924+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
2014-09-10T19:01:24.309931+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
2014-09-10T19:01:24.309938+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
2014-09-10T19:01:24.309957+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `block in instrument'
2014-09-10T19:01:24.309962+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2014-09-10T19:01:24.309898+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/inheritance.rb:23:in `new'
2014-09-10T19:01:24.309901+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2014-09-10T19:01:24.309902+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action'
2014-09-10T19:01:24.309903+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
2014-09-10T19:01:24.309923+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
2014-09-10T19:01:24.309954+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
2014-09-10T19:01:24.309919+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
2014-09-10T19:01:24.309933+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
2014-09-10T19:01:24.309935+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
2014-09-10T19:01:24.309958+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-09-10T19:01:24.309965+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionview-4.1.5/lib/action_view/rendering.rb:30:in `process'
2014-09-10T19:01:24.309920+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
2014-09-10T19:01:24.309959+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `instrument'
2014-09-10T19:01:24.309967+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal.rb:196:in `dispatch'
2014-09-10T19:01:24.309928+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
2014-09-10T19:01:24.309937+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
2014-09-10T19:01:24.309964+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:136:in `process'
2014-09-10T19:01:24.309952+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
2014-09-10T19:01:24.309960+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2014-09-10T19:01:24.309968+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2014-09-10T19:01:24.309981+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `call'
2014-09-10T19:01:24.309998+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-09-10T19:01:24.309963+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2014-09-10T19:01:24.309974+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:45:in `call'
2014-09-10T19:01:24.310001+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-09-10T19:01:24.309973+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:50:in `call'
2014-09-10T19:01:24.310000+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/flash.rb:254:in `call'
2014-09-10T19:01:24.309969+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal.rb:232:in `block in action'
2014-09-10T19:01:24.309993+00:00 app[web.1]: ven
dor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2014-09-10T19:01:24.310005+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/query_cache.rb:36:in `call'
2014-09-10T19:01:24.309976+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `each'
2014-09-10T19:01:24.309997+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-09-10T19:01:24.310007+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2014-09-10T19:01:24.309982+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:678:in `call'
2014-09-10T19:01:24.310003+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-09-10T19:01:24.309972+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
2014-09-10T19:01:24.309996+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-09-10T19:01:24.309992+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2014-09-10T19:01:24.310004+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2014-09-10T19:01:24.309975+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:71:in `block in call'
2014-09-10T19:01:24.309999+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-09-10T19:01:24.309970+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `call'
2014-09-10T19:01:24.309994+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2014-09-10T19:01:24.310008+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-09-10T19:01:24.310010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:82:in `run_callbacks'
2014-09-10T19:01:24.310024+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-09-10T19:01:24.310026+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-09-10T19:01:24.310033+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-09-10T19:01:24.310011+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-09-10T19:01:24.310016+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/rack/logger.rb:38:in `call_app'
2014-09-10T19:01:24.310027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2014-09-10T19:01:24.310034+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-09-10T19:01:24.310021+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-09-10T19:01:24.310036+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-09-10T19:01:24.310017+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/rack/logger.rb:20:in `block in call'
2014-09-10T19:01:24.310029+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-09-10T19:01:24.310037+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-09-10T19:01:24.310013+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-09-10T19:01:24.310018+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-09-10T19:01:24.310030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:514:in `call'
2014-09-10T19:01:24.310039+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-09-10T19:01:24.310012+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-09-10T19:01:24.310028+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
2014-09-10T19:01:24.310019+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-09-10T19:01:24.310038+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-09-10T19:01:24.310014+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-09-10T19:01:24.310022+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/rack/logger.rb:20:in `call'
2014-09-10T19:01:24.310032+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:144:in `call'
2014-09-10T19:01:24.310040+00:00 app[web.1]:
2014-09-10T19:01:24.310023+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-09-10T19:01:24.310041+00:00 app[web.1]:
我没有看到任何错误!
答案 0 :(得分:1)
您的gem文件是否具有适用于Heroku的开发和生产数据库?当我忘记添加postgres时,我收到了类似的错误。
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
end
https://devcenter.heroku.com/articles/getting-started-with-rails4
答案 1 :(得分:0)
这似乎是一个Devise错误(基于导致它的原因 - 注册和登录,但不是关于 - 以及错误日志中的“Warden”)。
可能没有正确配置Devise。
看看this article。
在config/initializers/devise.rb
文件中,您需要将某些内容设置为密钥。如果你还没有使用rake secret
(在CL中)生成一个。然后将其保存为环境变量,并确保它在Heroku和您当地的环境中。
如果您已经拥有一个安全的环境变量密钥,则可能是另一个Devise配置问题。