在我的Rails应用中。 javascript_include_tag似乎在我的localhost(mogrel)中正常工作,但我转向生产(Phusion Passenger)它似乎行为不同而且我得到以下异常:(不确定它要求all.js !!)
A ActionView::TemplateError occurred in posts#show:
Permission denied - /var/www/war/releases/20091021160940/public/javascripts/all.js
On line #9 of app/views/layouts/base_posts.html.erb
6: <%= stylesheet_link_tag 'prototube/prototube', :media => 'all' %>
7: <%= stylesheet_link_tag 'flowplayer', :media => 'all' %>
8:
9: <%= javascript_include_tag :defaults, 'jquery','jquery.tools.min', 'thickbox', 'truncator', :cache=>true %>
10: <script type="text/javascript" src="/javascripts/prototube.js"></script>
11: <script type="text/javascript" src="/javascripts/swfobject.js"></script>
12: <script type="text/javascript" src="/javascripts/scriptaculous.js?load=effects"></script>
任何想法?
谢谢,
担
答案 0 :(得分:1)
检查服务器上该目录的权限。时间:缓存=&gt;是的,Rails将创建一个组合的javascript文件来提供服务(以保存客户端的HTTP请求)。
请参阅http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M001713