gpt4 book ai didi

ruby - "Errno::EACCESS...permission denied"运行 compass watch

转载 作者:可可西里 更新时间:2023-11-01 12:29:33 25 4
gpt4 key购买 nike

我刚刚将我的项目文件迁移到 D: 驱动器上的新 PC,而我的程序(Git、Node Js、Ruby 等)位于 C:开车。

我曾尝试在编辑 SASS 文件后运行 compass watch,但遇到此错误:

Errno::EACCES on line ["897"] of C: Permission denied - <D:/project_dir/stylesheets/app.css20140323-10532-gziux, D:/project_dir/stylesheets/app.css>
Run with --trace to see the full backtrace

我是命令行 Ruby 的新手(因为我只将它用于 Web 开发目的)。我需要做什么才能允许权限?

如果我可以提供更多信息,请告诉我。

编辑:以下是运行 compass watch --trace 后返回的内容:

D:\project_dir>compass watch --trace
>>> Change detected at 21:53:53 to: app.scss
overwrite stylesheets/app.css
Errno::EACCES on line ["897"] of C: Permission denied - (D:/project_dir/stylesheets/app.css20140323-14712-11v62k7, D:/project_dir/stylesheets/app.css)
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.18/lib/sass/util.rb:897:in `atomic_create_and_write_file'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/actions.rb:58:in `write_file'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:143:in `compile'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:118:in `compile_if_required'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:103:in `block (2 levels) in run'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:101:in `each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:101:in `block in run'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:126:in `timed'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/compiler.rb:100:in `run'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/commands/watch_project.rb:147:in `recompile'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/commands/watch_project.rb:68:in `perform'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/commands/base.rb:18:in `execute'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/commands/project_base.rb:19:in `execute'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/bin/compass:30:in `block in <top (required)>'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/bin/compass:44:in `call'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-0.12.4/bin/compass:44:in `<top (required)>'
C:/Ruby200-x64/bin/compass:23:in `load'
C:/Ruby200-x64/bin/compass:23:in `<main>'
>>> Compass is polling for changes. Press Ctrl-C to Stop.

虽然我不知道该怎么做。

通过一些阅读(https://github.com/chriseppstein/compass/issues/1406),我相信这与“Ruby”和“Ruby Gems”的权限或路径有关,但我不知道如何解决这个。

最佳答案

为了让它在 32 位或 64 位窗口中工作,我按照 Min Ren 的建议做了,但我还必须手动清理 gem 存储库 (C:\Users\myusername\.gem\specs\rubygems.org% 443\quick\Marshal.4.8) 卸载步骤后的所有 sass 和 compass gemspec 文件。我还在 compass 之前安装了 sass。

gem uninstall compass
gem uninstall sass

手动清理 .gem

gem install sass --version "3.2.10"
gem install compass --version "0.12.2"

关于ruby - "Errno::EACCESS...permission denied"运行 compass watch ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22597223/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com