Home ERROR: While executing gem ... (Errno::EPERM) Operation not permitted
Reply: 2

ERROR: While executing gem ... (Errno::EPERM) Operation not permitted

Roy Calderon
Roy Calderon Published in 2015-10-01 15:59:23Z

This question already has an answer here:

  • Can't install gems on OS X “El Capitan” 14 answers

I just updated my Mac to OSX 10.11 El Capitan and some gems didn't remain.

The problem arose when I tried to run installations of different gems... e.g.:

> sudo gem install compass

Once I execute, I get the error:

> ERROR:  While executing gem ... (Errno::EPERM) Operation not permitted

This happens with other gems, as well...

I've run Homebrew and tried to install Ruby again, but nothing is working.

tbodt Reply to 2016-03-09 21:19:32Z

I found the answer on SASS issues.. https://github.com/sass/sass/issues/1768

Apparently with OSX el Capitan, there is a new security function that prevents you from modifying system files called Rootless. So you'll have 2 options:

If you install gems on /usr/local/bin there will be no problem because rootless doesn't affect this path.

sudo gem install -n /usr/local/bin GEM_NAME_HERE

Abid Ur Rehman
Abid Ur Rehman Reply to 2015-10-03 20:21:31Z

You are experiencing this issue because of a new security feature called System Integrity Protection

You can disable SIP by following the process mentioned below:

  1. Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
  2. Click Utilities > Terminal.
  3. In the Terminal window, type in csrutil disable and press Enter.
  4. Restart your Mac.
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319357 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO