Ant*_*ner 4 ruby ruby-on-rails-4
我正在使用 Rails 4.2.4、ruby 2.1.7 运行 JetBrains RubyMine,并且正在创建一个应用程序作为培训项目的一部分。我正在尝试包含 SASS 并正在试验某些样式表。我添加了 SASS gems 并根据 SASS-rails 文档导入了文字,我的应用程序开始抛出这个(跟踪):
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...
Run Code Online (Sandbox Code Playgroud)
我已确认“每个人”的权限可以完全控制我的项目中的 tmp 目录。我做了几次 rake tmp:cache:clear ,但没有成功。我试过完全吹走目录但没有成功。这不是 Unix 环境,因此运行 chmod 并调整 group:user rwx 权限是不可能的。有人遇到过这个吗?
找到了一个不同的解决方案:
在 test/test_helper.rb 中,注释掉以下行:
# parallelize(workers: :number_of_processors, with: :threads)
Run Code Online (Sandbox Code Playgroud)
没有并行测试,没问题
我解决了我自己的问题。
权限是由于项目文件位于服务器共享上而获得的。一旦我将项目文件移动到本地 C: 上的可用位置(权限方面),我的问题立即解决了。
将考虑为开发人员选择 Linux VM。
| 归档时间: |
|
| 查看次数: |
2000 次 |
| 最近记录: |