在我看来,我有:
<a href="<%= @project.file.url %>"><%= @project.file.name %></a>
本地,在开发中,一切正常,我可以下载文件。但是在我的VPS制作中,我得到了404:
[Mon Nov 05 18:28:40 2012] [error] [client 88.7.246.152] File does not exist:
/srv/http/media, referer: http://www.stanosas.it/copisteria/projects/1
log/production.log
link_to
效果很好。
这是我的Apache(乘客)设置https://gist.github.com/4018657
我在www.myapp.com/copisteria
此处为config/initializers/dragonfly.rb
https://github.com/enricostano/copisteria/blob/master/config/initializers/dragonfly.rb
此处为config/application.rb
https://github.com/enricostano/copisteria/blob/master/config/application.rb
任何提示?
编辑:似乎Apache或Passenger无法识别URL中的子目录。