2

您好,我遇到了路由错误的问题,但我不知道为什么,我的 routes.rb 中没有任何放入,而且我没有使用此路由。我有 Nginx 和 puma,如果你看到日志,你可以看到没有路由匹配“devices/22222.xml”我不知道错误是什么意思。

我在 production.rb 中禁用了静态资产服务器

config.serve_static_assets = false
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
config.force_ssl = true

这是我的日志:

ActionController::RoutingError (No route matches [PUT] "/devices/222222.xml"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
rack-ssl (1.3.3) lib/rack/ssl.rb:27:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
railties (3.2.13) lib/rails/railtie/configurable.rb:30:in `method_missing'
puma (2.6.0) lib/puma/configuration.rb:68:in `call'
puma (2.6.0) lib/puma/server.rb:486:in `handle_request'
puma (2.6.0) lib/puma/server.rb:357:in `process_client'
puma (2.6.0) lib/puma/server.rb:250:in `block in run'
puma (2.6.0) lib/puma/thread_pool.rb:92:in `call'
puma (2.6.0) lib/puma/thread_pool.rb:92:in `block in spawn_thread'
4

0 回答 0