Rails 错误:开发环境中的 ActionView::Template::Error(权限被拒绝 @ sys_fail2) [英] Rails Error: ActionView::Template::Error (Permission denied @ sys_fail2) in dev environment

查看:37
本文介绍了Rails 错误:开发环境中的 ActionView::Template::Error(权限被拒绝 @ sys_fail2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Rails 4.2.4、ruby 2.1.7 运行 JetBrains RubyMine,并且正在创建一个应用程序作为培训项目的一部分.我正在尝试包含 SASS 并正在试验某些样式表.我添加了 SASS gems 并根据 SASS-rails 文档导入了文字,我的应用程序开始抛出这个(跟踪):

I am running JetBrains RubyMine with rails 4.2.4, ruby 2.1.7, and am creating an application as part of a training project. I am trying to include SASS and am experimenting with certain stylesheets. I added SASS gems and import verbiage per SASS-rails documentation, and my application started throwing this (trace):

Errno::EACCES in Sessions#new
Showing H:/Development/RubyMine/DiceRollerWeb/app/views/sessions/new.html.erb where line #5 raised:

Permission denied @ sys_fail2 - (H:/Development/RubyMine/DiceRollerWeb/tmp/cache/assets/development/sprockets/v3.0/dWWzdOdzonUK3KUkyL3m5nbzYnP4jQTIQVpW3bCJg3k.cache.55176684.7688.886554, H:/Development/RubyMine/DiceRollerWeb/tmp/cache/assets/development/sprockets/v3.0/dWWzdOdzonUK3KUkyL3m5nbzYnP4jQTIQVpW3bCJg3k.cache)
Rails.root: H:/Development/RubyMine/DiceRollerWeb

Application Trace | Framework Trace | Full Trace
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:525:in `rename'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:525:in `block in mv'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1579:in `block in fu_each_src_dest'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1595:in `fu_each_src_dest0'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1577:in `fu_each_src_dest'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:514:in `mv'
sprockets (3.4.0) lib/sprockets/path_utils.rb:277:in `atomic_write'
sprockets (3.4.0) lib/sprockets/cache/file_store.rb:108:in `set'
sprockets (3.4.0) lib/sprockets/cache.rb:210:in `set'
sprockets (3.4.0) lib/sprockets/cache.rb:136:in `set'
sprockets (3.4.0) lib/sprockets/legacy.rb:128:in `cache_set'
sass-rails (5.0.4) lib/sass/rails/cache_store.rb:13:in `_store'
And so on...

我已确认每个人"的权限,以完全控制我项目中的 tmp 目录.我做了几次 rake tmp:cache:clear ,但没有成功.我试过完全吹走目录但没有成功.这不是 Unix 环境,因此运行 chmod 并调整 group:user rwx 权限是不可能的.以前有人遇到过这种情况吗?

I have confirmed permissions for "Everyone" to full control on the tmp directory in my project. I did a rake tmp:cache:clear several times, without success. I've tried blowing away the directory entirely without success. This isn't a Unix environment, so running chmod and adjusting group:user rwx permissions is out of the question. Anyone run into this before?

推荐答案

找到了不同的解决方案:

Found a different solution:

在 test/test_helper.rb 中,注释掉以下行:

In test/test_helper.rb, commented out the following line:

# parallelize(workers: :number_of_processors, with: :threads)

没有并行测试,没问题

这篇关于Rails 错误:开发环境中的 ActionView::Template::Error(权限被拒绝 @ sys_fail2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆