24

After installing OS X El Capitan (10.11) my ruby compass is no longer working. After trying to install compass I recieve error message like this:

$ sudo gem install compass
  ERROR:  While executing gem ... (Errno::EPERM)
      Operation not permitted - /usr/bin/compass

How this can be fixed?

Leo
  • 5,363
  • 5
  • 27
  • 30
  • 1
    Hi @Leo, and welcome to SO. :-) If this is the working solution you provided, please post it as an answer to your question and accept it. This will help others with the same problem find what they're looking for easier. – Drenmi Oct 02 '15 at 09:38
  • 2
    Thanks Leo, but you should add the solution as an answer. Thanks again – Nash Vail Oct 02 '15 at 09:42
  • 1
    Thumbs up to Nash comment, for the sake of clarity. Oh, and thank you! :) – neiker Oct 02 '15 at 13:52
  • Sorry guys, I'm still a newbie her. I fixed that. Hopefully you got resolved this issue :) – Leo Oct 05 '15 at 14:28

2 Answers2

29

I had the same problem after upgrading to OS X El Capitan (10.11), but while trying to sudo gem install sass. The poster's solution of putting the path in the install command worked for me, and installing compass also installs sass, so: sudo gem install -n /usr/local/bin compass did the trick. Thanks Leo!

seanTcoyote
  • 372
  • 3
  • 9
21

The fix I found was simply to put the PATH in the install command for any ruby gem package:

$  sudo gem install -n /usr/local/bin GEM_PACKAGE_NAME

So with compass it worked for me as:

$ sudo gem install -n /usr/local/bin compass

Good Luck!

Leo
  • 5,363
  • 5
  • 27
  • 30
  • How is this any different than the existing answer? – cimmanon Oct 05 '15 at 14:27
  • 3
    At first I included the answer in the question. This is just a separation of the two. – Leo Oct 05 '15 at 14:30
  • Don't post duplicate answers. [You've already posted this answer on another question](http://stackoverflow.com/a/32903516/1652962). If two questions can be answered by the same answer, they should be closed as duplicates. – cimmanon Oct 05 '15 at 14:32
  • Ok, 10x, it's noticed! – Leo Oct 05 '15 at 14:35