2015-11-12 33 views
0

我很咕嚕,而且很喜歡它,但是對於我轉向'el capitan'之後缺乏指南針的成功感到非常沮喪。從繁重的項目目錄,運行「咕嚕咕嚕」似乎已表明SASS/SCSS失敗羅盤/手錶組合來編譯EPERM錯誤:指南針失敗後遷移到'El Capitan'

sh-3.2# grunt 
Running "compass:dev" (compass) task 
unchanged img/common/1x-scb9effd9a6.png 
unchanged img/common/2x-sd9683d03fa.png 
Errno::EPERM on line ["512"] of /Library/Ruby/Gems/2.0.0/gems/sass-3.4.19/lib/sass/plugin/compiler.rb: Operation not permitted - /Applications/MAMP/htdocs/Repos/dev/wp-content/themes/quindodo/_/css/giving.css 
Run with --trace to see the full backtrace 
Warning: ↑ Use --force to continue. 

咕嚕文件如下:

module.exports = function(grunt) { 

//All configuration goes here 
grunt.initConfig({ 
    pkg: grunt.file.readJSON('package.json'), 

    compass: { 
     dev: { 
      options: {    
       sassDir: 'sass', 
       cssDir: 'css', 
       fontsDir: 'fonts', 
       imagesDir: 'img', 
       images: 'img', 
       javascriptsDir: 'js/pro', 
       //environment: 'development', 
       outputStyle: 'compressed', 
       relativeAssets: false, 
       httpPath: '.', 
      } 
     }, 
    }, 

    watch: { 
      compass: { 
      files: ['*.{scss,sass}'], 
      tasks: ['compass:dev'], 
     } 

    }, 
}); 
// Where we tell Grunt we plan to use this plug-in. 
grunt.loadNpmTasks('grunt-contrib-compass'); 
grunt.loadNpmTasks('grunt-contrib-watch'); 

// Where we tell Grunt what to do when we type "grunt" into the terminal. 
grunt.registerTask('default',['compass','watch']); 
}; 

最後,我的package.json

{ 
"name": "quindido", 
"version": "0.0.0", 
"description": "Quindodo Theme CSS", 
"private": true, 
"devDependencies": { 
"grunt": "~0.4.5", 
"grunt-contrib-jshint": ">=0.10.0", 
"grunt-contrib-nodeunit": ">=0.4.1", 
"grunt-contrib-sass": ">0.0.1", 
"grunt-contrib-watch": ">0.0.1" 
    } 
} 

我將非常感謝解決方案。我試過禁用CIP。我也試過'sudo gem install -n/usr/local/bin compass'以及'gem update --system'。我想我已經成功地卸載並重新安裝了npm和模塊。我也試過從devDependencies中刪除'grunt-contrib-compass'。

+0

對於任何人遇到同樣的問題,嘗試運行'咕嚕-v --force'。雖然它沒有解決問題,但它確實提供了更多的見解。我至少看到它可以很好地讀取,但是在精度錯誤的'寫入'狀態下出現錯誤。 – beta208

回答

0

我通過卸載所有二進制文件/寶石(包括ruby)和更新/ usr/bin到/ usr/local/bin的路徑解決了此問題。根據您的原始操作系統等,您的路徑可以在各種隱藏文件中。更新路徑後,重新安裝二進制文件,以便安裝並從/ usr/local/bin運行。嘗試使用下面的終端命令來查找您的二進制文件/主動紅寶石:

gem e 
ruby version