Rails 请问这是因图片路径无法加载导致的错误吗?

maxchen · 2018年03月24日 · 最后由 qqerqqer 回复于 2018年03月25日 · 1726 次阅读

应用能正常加载,但出现了一些错误信息,如下:

ctionController::RoutingError (No route matches [GET] "/uploads/article/cover/2/background2.jpg"):

actionpack (5.2.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.4) lib/rack/method_override.rb:22:in `call'
rack (2.0.4) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.0.rc1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.4) lib/rack/sendfile.rb:111:in `call'
railties (5.2.0.rc1) lib/rails/engine.rb:524:in `call'
puma (3.11.3) lib/puma/configuration.rb:225:in `call'
puma (3.11.3) lib/puma/server.rb:624:in `handle_request'
puma (3.11.3) lib/puma/server.rb:438:in `process_client'
puma (3.11.3) lib/puma/server.rb:302:in `block in run'
puma (3.11.3) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

请问是因为这个图片无法加载错误导致下面的错误提示的吗?应用倒能运行,需要在意这些吗?

ActionController::RoutingError (No route matches [GET] "/uploads/article/cover/2/background2.jpg"):

@maxchen 是的,你的猜测是正确的,就是缺少/uploads/article/cover/2/background2.jpg文件。

这个文件看起来像是文章背景图?既然项目有请求这个图片,我觉得应该有块代码调用了这个图片,你查查项目的相关的代码。建议最好加上这个图片。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号