我有两个布局,一个是application.html.erb
,另一个是post.html.erb
所有使用布局application.html.erb的页面除了一个使用post.html.erb的页面
application .html.erb
的所有网页都在运行,但post
布局的网页仅在生产模式下无效。
当我将error.log
错误称为
ActionView::Template::Error (Permission denied - /var/rails_apps/domain.com/releases/20131025170245/tmp/cache/assets/production/sprockets/82446875410ad6d3314b2a4bb29a4945):
4: <title><%= content_for?(:title) ? "Domain - " + yield(:title) : "Domain" %></title>
5: <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6: <%= stylesheet_link_tag "post", media: "all", "data-turbolinks-track" => true %>
7: <%= javascript_include_tag "post", "data-turbolinks-track" => true %>
8: <link href='http://fonts.googleapis.com/css?family=Oxygen' rel='stylesheet' type='text/css'>
9: <%= csrf_meta_tags %>
10: </head>
pp/views/layouts/post.html.erb:7:in `_app_views_layouts_post_html_erb__192281524152602475_69920226629340'
我将权限设置为0777
,以便如何实现。{p>任何人都可以提供帮助。
答案 0 :(得分:2)
我遇到了与Apache + Passenger相同的问题并由此修复:
# cd tmp/cache/assets/production
# chown -R nobody:nogroup ./sprockets
# ls -l | grep sprockets
drwxr-xr-x 2 nobody nogroup 4096 MM DD HH:MM sprockets/