代码之家  ›  专栏  ›  技术社区  ›  Deviland

COMPASS CREATE权限被拒绝

  •  -1
  • Deviland  · 技术社区  · 11 年前

    我已经用gem安装了SASS和COMPASS

    gem install compass
    

    我正在尝试使用命令

    compass create .
    

    生成指南针项目,但当我这样做时,我会出现以下错误。

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

    当它试图创建 配置.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 回复  |  直到 11 年前
        1
  •  2
  •   Community Mohan Dere    8 年前

    我通过降低指南针版本来解决这个问题。然后我试着去理解错误是什么。 所以问题是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和compass版本。然后在它们之间寻找合适的版本。 这将使事情完美运作。 作为更好的解决方案,您可以使用以下方法: http://bundler.io/ .

    亲切的问候。

        2
  •  1
  •   Yazid    11 年前

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

        3
  •  0
  •   Community Mohan Dere    8 年前

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

    stackoverflow answer

        4
  •  0
  •   Luan D    11 年前

    您可以这样做:

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

    并安装:

      compass install blueprint
    

    它对我有用