COMPASS CREATE权限被拒绝

时间:2014-03-23 14:10:57

标签: ruby windows compass-sass

我使用

安装了SASS和COMPASS
gem install compass

我正在尝试使用命令

compass create .

生成指南针项目,但是当我这样做时,我收到以下错误。

Errno::EACCES on line ["897"] of C: Permission denied

这似乎是在尝试创建 config.rb 文件 我有点失落,因为它似乎能够同时创建样式表 sass 目录

PS C:\Projects\tutorials\sass> compass create --trace
create config.rb
Errno::EACCES on line ["897"] of C: Permission denied - (C:/Projects/tutorials/sass/config.rb20140323-9028-1j0o9n1, C:/P
rojects/tutorials/sass/config.rb)
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.18/lib/sass/util.rb:897:in `atomic_create_and_write_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/actions.rb:58:in `write_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/app_integration/stand_alone/installer.rb:20:in `write_c
onfiguration_files'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/app_integration/stand_alone/installer.rb:35:in `prepare
'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/installers/base.rb:32:in    `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-.12.4/lib/c ompass/commands/stamp_pattern.rb:75:in `perform'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/commands/base.rb:18:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/commands/project_base.rb:19:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:30:in `block in <top   (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:44:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:44:in `<top (required)>'
C:/Ruby193/bin/compass:23:in `load'
C:/Ruby193/bin/compass:23:in `<main>'

任何人都可以帮我解决这个问题的任何帮助都将非常感激

4 个答案:

答案 0 :(得分:2)

我通过降级指南针版本解决了这个问题。然后我试着去理解错误是什么。 所以问题是sass 3.2.14和3.3.4之间的版本冲突。罗盘0.12.3取决于3.2.14 sass verison。 请查看此链接Can't get sass + compass + susy installed due to version conflict

如果您想使用最新的指南针版本。你可以卸载你拥有的所有sass和指南针版本。然后在它们之间寻找合适的版本。 这将完美地运作。 作为更好的解决方案,您可以使用此功能:http://bundler.io/

亲切的问候。

答案 1 :(得分:1)

你是对的。在这里,您可以找到有关此问题的详细信息:https://github.com/chriseppstein/compass/issues/1618#issuecomment-38397775 他们正在努力解决它。

答案 2 :(得分:0)

我想我在错误中指定的util.rb文件中发现了这个问题,我试图更改文件的权限,我认为这个链接可能会有答案。

stackoverflow answer

答案 3 :(得分:0)

你可以这样做:

  gem install compass -v 0.12.3 --no-rdoc --no-ri

并安装:

  compass install blueprint

它对我有用