我的Rails应用程序出现致命错误,与我认为的设计相关。错误消息对我来说还不清楚,并且我没有对此进行任何更改可能会导致此错误。
编辑:日志文件链接: https://drive.google.com/file/d/1HdNnMsHTR0mULqMNKbyM5ZHW7nTXjhoH/view?usp=drivesdk
要解决此问题,我已推迟了独角兽服务,甚至服务器重新启动,但这两项都没有解决。
在下面,您可以查看日志消息。如果您能帮助我解决该问题,我将不胜感激。
F,[2019-05-18T14:26:17.175396 #1883] FATAL -- : [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] F, [2019-05-18T14:26:17.175536 #1883] FATAL -- : [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] NoMethodError (undefined method `call' for ActionController::Responder:Class Did you mean? caller):
F, [2019-05-18T14:26:17.175559 #1883] FATAL -- : [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] F, [2019-05-18T14:26:17.175585 #1883] FATAL -- : [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] responders (2.4.0) lib/action_controller/respond_with.rb:211:in `respond_with' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] devise (4.5.0) app/controllers/devise/sessions_controller.rb:14:in `new' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] actionpack (5.0.7) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] actionpack (5.0.7) lib/abstract_controller/base.rb:188:in `process_action' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] actionpack (5.0.7) lib/action_controller/metal/rendering.rb:30:in `process_action' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] actionpack (5.0.7) lib/abstract_controller/callbacks.rb:20:in `block in process_action' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.rb:126:in `call' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.rb:455:in `call' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.rb:101:in `__run_callbacks__' [2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
[2adb42f5-0603-4e2a-b1bc-835fbb6223a5] activesupport (5.0.7) lib/active_support/callbacks.--More--
答案 0 :(得分:0)
在寻找解决方案时,我在这里遇到了类似的问题:Devise authentication error with ActionController::Responder and axlsx_rails gem
在上述问题中,用户提到axlsx-rails gem的动作控制器存在一个已知问题(axlsx-rails出现了一个动作控制器问题,他为此安装了补丁。
几天前,我还为我的应用程序中的XLSX导出添加了axlsx-rails gem。就我而言,直到今天我添加了gem后我都没有任何问题(我想我的登录凭据直到今天才有效,而当我今天需要重新登录时,我遇到了问题)
我已经在系统中搜索了gem文件,然后手动应用了补丁:
gems/ruby-2.3.1/gems/axlsx_rails-0.5.1/lib/axlsx_rails
ActionController::Renderers.add :xlsx do |filename, options|
unless formats.include?(:xlsx) || Rails.version < '3.2'
formats[0] = :xlsx
end