rails 4 ActionView :: Template ::生产中出错

时间:2013-10-26 02:28:31

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-4

我有两个布局,一个是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>任何人都可以提供帮助。

1 个答案:

答案 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/