【问题标题】:Rails: ActionView::Template::Error (Operation not permitted Error in production.logRails: ActionView::Template::Error (Operation not allowed Error in production.log
【发布时间】:2012-01-16 03:04:00
【问题描述】:

这是我的 production.log 中不断弹出的内容

Started GET "/" for 173.26.190.110 at 2011-12-08 12:21:24 -0500
  Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (19.9ms)
Compiled application.js  (9ms)  (pid 4397)
Compiled bootstrap-modal.js  (1ms)  (pid 4397)
Completed 500 Internal Server Error in 148ms

ActionView::Template::Error (Operation not permitted - /opt/nginx/html/mrfs/tmp/cache/assets/CD3/620/sprockets%2Fa2dc05811f5202de098f49234f831c1c):
    9:     <![endif]-->
    10:
    11:         <%= stylesheet_link_tag    "application.css" %>
    12:         <%= javascript_include_tag      "application.js" %>
    13:
    14:   <script type="text/javascript">
    15:
  app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb___536300347_80777950'

这是什么意思?我该如何解决?

application.js:

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require twitter/bootstrap

更新

我不确定发生了什么变化,但它现在似乎可以正常工作,并且从今天下午 1:57 左右开始。我不确定是什么原因造成的。是否有可能在 nginx 或 rails 内部进行缓存会导致它挂起并且当时缓存已被刷新?

【问题讨论】:

  • 你的 application.js 文件中有什么?
  • 您对公共目录有写权限吗?
  • 这绝对是权限问题。以防万一尝试: chmod -R 777 /opt/nginx/html/mrfs/tmp
  • 从更新中可以看出,这个问题已经解决了。
  • @NoahClark 你应该提交你的更新作为这个问题的答案(并接受答案),这样它就会被关闭。

标签: ruby-on-rails asset-pipeline actionview


【解决方案1】:

我不确定发生了什么变化,但它现在似乎可以正常工作,并且从今天下午大约 1:57 开始就开始了。我不确定是什么原因造成的。是否有可能在 nginx 或 rails 内部进行缓存会导致它挂起并且当时缓存已被刷新?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-26
    • 1970-01-01
    • 2022-07-07
    相关资源
    最近更新 更多