Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBen Attenborough
Front End Web Development Techdegree Graduate 32,769 PointsEl Capitan changes affecting web developers
Hi all, I just wanted to warn Mac people thinking of upgrading to El Capitan that the upgrade can affect web development.
One of the biggies I've come across is problems installing Ruby gems such as sass. The command:
gem install sass
Can throw the following error under El Capitan:
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/sass
I believe El Capitan reserves the folder /usr/bin and prevents things being installed in there. The workaround which works for me is to tell gem to install to a local folder, as follows:
gem install -n /usr/local/bin GEM_NAME_HERE
There's more on the topic here: https://github.com/sass/sass/issues/1768
Has anyone else encountered this problem? What is the best workaround / practice?
1 Answer
rydavim
18,814 PointsBasically, El Capitan nerfed root access, which in turn gummed up stuff for developers. I ended up doing some research and the following steps fixed my problems with El Capitan's Systems Integrity Protection.
Disable Systems Integrity Protection:
- Reboot holding
Cmd + R
to get into recovery mode. - Bring up a terminal from the dropdown menu.
- Run
csrutil disable
to disable Systems Integrity Protection. - Reboot as normal and log back into OSX.
Great! Now you can go about fixing your permissions.
sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
That will fix your permissions back to what most developer utilities are expecting. It should also let you make modifications even if you turn Systems Integrity Protection back on.
You may also need to re-install the xcode developer tools.
xcode-select --install
If you want to, you can now reboot into recovery mode again and turn Systems Integrity Protection back on.
Ben Attenborough
Front End Web Development Techdegree Graduate 32,769 PointsBen Attenborough
Front End Web Development Techdegree Graduate 32,769 PointsHmmm, should we really be disabling system integrity protection? Is that really what Apple wants developers to do? It's not exactly encouraging for beginners getting into code is it?
Still thanks for the comprehensive answer!
rydavim
18,814 Pointsrydavim
18,814 PointsWell, after you fix your permissions you can turn it back on. I turned mine back on.