- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 nginx 在 Ubuntu 上运行的 Rails 应用程序。似乎我在任何涉及 ActiveRecord 的页面上都收到了 TypeError (no implicit conversion of nil into String)
。
这是给出错误的行的示例:
@instance = Instance.new
@foo = 'bar'
,不会引发异常。
I, [2019-08-27T17:44:48.170158 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Started GET "/instances/new" for 75.129.211.194 at 2019-08-27 17:44:48 +0000
I, [2019-08-27T17:44:48.172925 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Processing by InstancesController#new as HTML
D, [2019-08-27T17:44:48.179086 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:49:in `include?'
D, [2019-08-27T17:44:48.179212 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:49:in `rescue in postgresql_connection'
D, [2019-08-27T17:44:48.179326 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/post
gresql_adapter.rb:33:in `postgresql_connection'
D, [2019-08-27T17:44:48.179441 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:879:in `new_connection'
D, [2019-08-27T17:44:48.179565 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:923:in `checkout_new_connection'
D, [2019-08-27T17:44:48.179676 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abst
ract/connection_pool.rb:902:in `try_to_checkout_new_connection' D, [2019-08-27T17:44:48.179793 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abst
ract/connection_pool.rb:863:in `acquire_connection'
D, [2019-08-27T17:44:48.179905 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abst
ract/connection_pool.rb:587:in `checkout' D, [2019-08-27T17:44:48.180005 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abst
ract/connection_pool.rb:431:in `connection'
D, [2019-08-27T17:44:48.180098 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1111:in `retrieve_connection'
D, [2019-08-27T17:44:48.180189 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_handling.rb:231:in `retrieve_connection'
D, [2019-08-27T17:44:48.180273 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/connection_handling.rb:1
99:in `connection'
D, [2019-08-27T17:44:48.180353 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/model_schema.rb:487:in `
load_schema!'
D, [2019-08-27T17:44:48.180431 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/attributes.rb:247:in `lo
ad_schema!'
D, [2019-08-27T17:44:48.180523 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/attribute_decorators.rb:
51:in `load_schema!'
D, [2019-08-27T17:44:48.180604 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/model_schema.rb:480:in `
block in load_schema'
D, [2019-08-27T17:44:48.180685 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
D, [2019-08-27T17:44:48.180782 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/model_schema.rb:477:in `
load_schema'
D, [2019-08-27T17:44:48.180887 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/model_schema.rb:362:in `
attribute_types'
D, [2019-08-27T17:44:48.180962 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/attribute_methods.rb:171
:in `has_attribute?'
D, [2019-08-27T17:44:48.181045 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/inheritance.rb:55:in `ne
w'
D, [2019-08-27T17:44:48.181143 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /var/www/mothership/app/controllers/instances_controller.rb:16:in `new' [69/1859]
D, [2019-08-27T17:44:48.181223 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/basic_implicit_r
ender.rb:6:in `send_action'
D, [2019-08-27T17:44:48.181305 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/abstract_controller/base.rb:196:in `proc
ess_action'
D, [2019-08-27T17:44:48.181386 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/rendering.rb:30:
in `process_action'
D, [2019-08-27T17:44:48.181464 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/abstract_controller/callbacks.rb:42:in `
block in process_action'
D, [2019-08-27T17:44:48.181548 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:135:in `r
un_callbacks'
D, [2019-08-27T17:44:48.181624 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/abstract_controller/callbacks.rb:41:in `
process_action'
D, [2019-08-27T17:44:48.181705 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/rescue.rb:22:in
`process_action'
D, [2019-08-27T17:44:48.181791 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/instrumentation.
rb:33:in `block in process_action'
D, [2019-08-27T17:44:48.181871 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:i
n `block in instrument'
D, [2019-08-27T17:44:48.181954 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/notifications/instrume
nter.rb:24:in `instrument'
D, [2019-08-27T17:44:48.182034 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:i
n `instrument'
D, [2019-08-27T17:44:48.182109 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/instrumentation.
rb:32:in `process_action'
D, [2019-08-27T17:44:48.182193 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal/params_wrapper.r
b:245:in `process_action'
D, [2019-08-27T17:44:48.182280 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.0/lib/active_record/railties/controller_runt
ime.rb:27:in `process_action'
D, [2019-08-27T17:44:48.182368 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/abstract_controller/base.rb:136:in `proc
ess'
D, [2019-08-27T17:44:48.182440 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.0/lib/action_view/rendering.rb:39:in `process'
D, [2019-08-27T17:44:48.182530 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal.rb:191:in `dispa
tch'
D, [2019-08-27T17:44:48.182604 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_controller/metal.rb:252:in `dispa
tch'
D, [2019-08-27T17:44:48.182678 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:51:
in `dispatch'
D, [2019-08-27T17:44:48.182759 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:33:
in `serve'
D, [2019-08-27T17:44:48.182875 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:49:in
`block in serve'
D, [2019-08-27T17:44:48.182949 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:32:in
`each'
D, [2019-08-27T17:44:48.183027 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:32:in
`serve'
D, [2019-08-27T17:44:48.183101 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:837
:in `call'
D, [2019-08-27T17:44:48.183182 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb:15:in `call' [21/1859]
D, [2019-08-27T17:44:48.183279 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/etag.rb:25:in `call'
D, [2019-08-27T17:44:48.183358 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/conditional_get.rb:25:in `call'
D, [2019-08-27T17:44:48.183439 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/head.rb:12:in `call'
D, [2019-08-27T17:44:48.183517 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/http/content_security_po
licy.rb:18:in `call'
D, [2019-08-27T17:44:48.183597 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
D, [2019-08-27T17:44:48.183677 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
D, [2019-08-27T17:44:48.183757 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/cookies.rb:64
8:in `call'
D, [2019-08-27T17:44:48.183848 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/callbacks.rb:
27:in `block in call'
D, [2019-08-27T17:44:48.183921 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:101:in `r
un_callbacks'
D, [2019-08-27T17:44:48.184013 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/callbacks.rb:
26:in `call'
D, [2019-08-27T17:44:48.184087 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/actionable_ex
ceptions.rb:17:in `call'
D, [2019-08-27T17:44:48.184162 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/debug_excepti
ons.rb:32:in `call'
D, [2019-08-27T17:44:48.184246 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/show_exceptio
ns.rb:33:in `call'
D, [2019-08-27T17:44:48.184328 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/rack/logger.rb:38:in `call_app'
D, [2019-08-27T17:44:48.184412 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/rack/logger.rb:26:in `block in call'
D, [2019-08-27T17:44:48.184487 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:80:i
n `block in tagged'
D, [2019-08-27T17:44:48.184567 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:28:i
n `tagged'
D, [2019-08-27T17:44:48.184642 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:80:i
n `tagged'
D, [2019-08-27T17:44:48.184716 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/rack/logger.rb:26:in `call'
D, [2019-08-27T17:44:48.184797 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/remote_ip.rb:
81:in `call'
D, [2019-08-27T17:44:48.184884 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/request_id.rb
:27:in `call'
D, [2019-08-27T17:44:48.184964 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
D, [2019-08-27T17:44:48.185058 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
D, [2019-08-27T17:44:48.185130 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/cache/strategy/local_c
ache_middleware.rb:29:in `call'
D, [2019-08-27T17:44:48.185211 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/executor.rb:1
4:in `call'
D, [2019-08-27T17:44:48.185312 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
D, [2019-08-27T17:44:48.185386 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.0/lib/action_dispatch/middleware/host_authoriz
ation.rb:77:in `call'
D, [2019-08-27T17:44:48.185466 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/engine.rb:526:in `call'
D, [2019-08-27T17:44:48.185545 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
D, [2019-08-27T17:44:48.185620 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_pro
cess_next_request'
D, [2019-08-27T17:44:48.185699 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
D, [2019-08-27T17:44:48.185784 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_thr
eads'
D, [2019-08-27T17:44:48.185871 #28979] DEBUG -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exc
eption'
I, [2019-08-27T17:44:48.188284 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Rendering instances/new.html.erb within layouts/application
I, [2019-08-27T17:44:48.190953 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Rendered instances/_form.html.erb (Duration: 1.7ms | Allocations: 856)
I, [2019-08-27T17:44:48.191108 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Rendered instances/new.html.erb within layouts/application (Duration: 2.7ms | Allocations: 1197)
I, [2019-08-27T17:44:48.191352 #28979] INFO -- : [dbaa09fa-9bbf-4e85-8c3f-3a43992c2fa2] Completed 500 Internal Server Error in 18ms (Allocations: 3772)
最佳答案
根据给定的信息,我无法确定,但您的堆栈跟踪表明问题是您的 Postgres 连接的空配置参数,特别是 libpq
.查看环境参数列表here .如果您的 shell 环境变量设置与应用程序不同,这将解释为什么您可以在生产中打开控制台而不会出现问题,并在应用程序不能时实例化和保存记录。
作为调试步骤,让您的应用程序将其所有环境变量转储到日志文件中,并确保在环境或 production
中设置了所有必需的数据库参数。 database.yml
的部分
关于ruby-on-rails - TypeError(没有将 nil 隐式转换为 String),仅在生产中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57617406/
sanitize 是什么意思在 Rails 中是什么意思? 我正在阅读 CanCanCan 的文档.它说: When using strong_parameters or Rails 4+, you
在过去的几个月里,我感觉自己对 Ruby on Rails (RoR) 开发的了解达到了极限。我为大/小客户和 friend /爱好项目开发了大大小小的应用程序。我知道如何开发这些应用程序,但开始感觉
我昨天参加了一个关于扩展 Rails 的聚会,其中一个主题是 Hexagonal Rails。然而,我只做了一年的 Rails,对 MVC 结构非常满意(也许太舒服了),所以我不太了解适配器和消息队列
我使用多个 Rails 应用程序,一些在 Rails 3.2/Ruby 2.0 上,一些在 Rails 2.3/Ruby 1.8.7 上。 他们的共同点是,随着他们的成长和添加更多的依赖项/ gem
这个问题在这里已经有了答案: Using Rails-UJS in JS modules (Rails 6 with webpacker) (5 个答案) 关闭 3 年前。 我正在尝试使用 UJS
我正在开发一个当前使用 Rails 1.2 的 Rails 应用程序,所以我现在离最新的稳定版本(Rails 2.3)还有很长的路要走。 我应该如何进行迁移到更新版本的 Rails 的过程? 我应该一
尝试按照 Ryan Bates Backbone.js 教程构建抽奖应用程序,但我已经遇到了第一段代码的问题。在 application.js 的 init 函数中,他初始化了 Raffler 路由的
我正在使用 Rails 3.2 并且我有一个数据库表,我想在其中找到符合以下条件的所有行: a = true and b = true and ( 0 true, :b =>
我有一个用户类和一个联系人,其中联系人是用户的子类。这两个类都存储在用户表中。 我的联系人可能有也可能没有电子邮件地址,而我的用户需要一个电子邮件地址(我的用户模型定义中有 validates_pre
我正在编写一个教程,我在其中演示了一些 rails 命令。在我的机器上 rails和 script/rails两者都同样有效。有“首选”形式吗?两者中哪一个更普遍? 最佳答案 当您运行 rails 时
我正在寻找有关通过我的应用程序前进的最佳方式的建议,这是我首次开始集成Elasticsearch。我是一名初学者,但是热衷于深入研究,以便原谅任何明显的错误! 我遵循了http://www.sitep
我刚刚用 Rails new 启动了一个新的 Rails 应用程序,将默认数据库设置更改为 PostgresSQL。我用 bin/rails s 启动服务器,结果很奇怪 2016-04-21 05:0
我收到一个参数并希望它是这样的字符串: "abc,efg" 或者像这样的数组 ["abc","efg"] 在第一种情况下,我想将它转换成一个数组,什么是好的方法? 这是我的想法 if params[:
我刚刚用 Rails new 启动了一个新的 Rails 应用程序,将默认数据库设置更改为 PostgresSQL。我用 bin/rails s 启动服务器,结果很奇怪 2016-04-21 05:0
我收到一个参数并希望它是这样的字符串: "abc,efg" 或者像这样的数组 ["abc","efg"] 在第一种情况下,我想将它转换成一个数组,什么是好的方法? 这是我的想法 if params[:
我有 Rails 4,这是我的默认版本(我仍然希望它是)。但我不想在我的电脑上添加 rails 3.2。在以下命令中:gem install rails -v 3.2.16 我有这个警告: railt
您好,我想使用 Sheevaplug 构建一个“Rails Brick”来自 Marvell(操作系统是开箱即用的 Ubuntu,但您可以在其上安装其他发行版)。它将成为家庭服务器和静音、低成本(99
我需要能够从 Rails 控制台发送我的 Rails 应用程序的 Postgres 数据库中所有未接受的邀请。 (我有一个名为 Invitations 的表,其中包含一个名为 accepted 的 b
validate :cannot_modify_if_locked, on: :update def cannot_modify_if_locked if self.locked erro
我正在学习教程(学习 Rails 播客),需要更改以下路由语法,以便它与 Rails 3.0 兼容。谁能帮忙? map.view_page ':name', :controller => 'viewe
我是一名优秀的程序员,十分优秀!