我有一个项目,涉及refinerycms(分支主管)和rails 4.1.1。
我正在使用carrierwave上传图像并与模型相关。文件上传工作正常,我看到公共文件夹中的图像:public/uploads/related_file/file/1/test.jpg
我正在尝试使用路径访问该图像
http://localhost:3000/uploads/related_file/file/1/test.jpg
<%= image_tag related_file.file_url if related_file.file_url.present?%>
但我收到 404 错误。
2014-09-25 15:43:31 -0500 Refinery::PagesController#show as JPEG 参数开始为 127.0.0.1 获取“/uploads/related_file/file/1/test.jpg”:{“path”= >"uploads/related_file/file/1/test", "locale"=>:en}
只是为了测试我正在尝试访问公共文件夹中的页面 404.html 和 505.html,但是这次我遇到了这些错误
找不到 Refinery::Page with 'id'=404 找不到 Refinery::Page with 'id'=500
显然炼油厂正在拦截对公共文件夹的请求。
我该如何解决?我只需要在我的页面中查看上传的图片,我该怎么做?
编辑:
只是为了测试,我在我的公共文件夹中添加了一个图像 test.jpg。当我试图在浏览器中查看该图像时,我得到了一个 404 错误页面。
http://localhost:3000/test.jpg
Started GET "/test.jpg" for 127.0.0.1 at 2014-09-26 09:57:53 -0500
Processing by Refinery::PagesController#show as JPEG
Parameters: {"path"=>"test", "locale"=>:en}
请问我需要帮助...
谢谢