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?

4
  • 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 2, 2015 at 9:38
  • 2
    Thanks Leo, but you should add the solution as an answer. Thanks again
    – Nash Vail
    Oct 2, 2015 at 9:42
  • 1
    Thumbs up to Nash comment, for the sake of clarity. Oh, and thank you! :)
    – neiker
    Oct 2, 2015 at 13:52
  • Sorry guys, I'm still a newbie her. I fixed that. Hopefully you got resolved this issue :)
    – Leo
    Oct 5, 2015 at 14:28

2 Answers 2

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!

1
  • I was not able to install compass with -n option but installing sass worked with it.
    – vinesh
    Oct 26, 2015 at 9:55
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!

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.