简体   繁体   English

Rails 3.1.3生产,资产管道:没有路线匹配

[英]Rails 3.1.3 production, asset pipeline: no route matches

I had set in my production.rb this: 我在我的production.rb设置了以下内容:

config.assets.compile = true

But the I'm still getting this error while using images recently uploaded by user 但是我在使用用户最近上传的图像时仍然出现此错误

ActionController::RoutingError (No route matches [GET] "/assets...

What am I doing wrong here? 我在这里做错了什么?

I've tested this running with passenger on the server on production environment and I've tested this this on production with WEBrick on my local machine. 我已经在生产环境中的服务器上对乘客进行了测试,并在本地计算机上使用WEBrick在生产中对其进行了测试。

===== SOLVED ======= =====已解决=======

Fixed my situation with this settings on my production.rb 使用我的production.rb上的此设置修复了我的情况

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true

  # Generate digests for assets URLs
  config.assets.digest = false

It's normal to me if you don't serve_static_assets : 如果您不serve_static_assets对我来说很正常:

config.serve_static_assets = false

This behavior is the default. 此行为是默认行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM