Installing sass on OS X 10.11 (El Capitan) #1768

aronstrandberg opened this Issue Jul 10, 2015 · 73 comments


None yet

My sass gem "disappeared" after installing the OS X 10.11 beta, and re-installing it doesn't seem to work.

Running without sudo, I get this:

Ignoring json-1.8.2 because its extensions are not built.  Try: gem pristine json --version 1.8.2
Ignoring json-1.8.3 because its extensions are not built.  Try: gem pristine json --version 1.8.3
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Library/Ruby/Gems/2.0.0/gems/sass-3.4.15/.yardopts

With sudo:

Ignoring json-1.8.2 because its extensions are not built.  Try: gem pristine json --version 1.8.2
Ignoring json-1.8.3 because its extensions are not built.  Try: gem pristine json --version 1.8.3
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/sass


nex3 commented Jul 10, 2015

This looks like an OS problem rather than a Sass problem. We don't do anything to change the default installation process.

@nex3 nex3 closed this Jul 10, 2015
nex3 commented Jul 10, 2015

It looks like this is popping up for at least several users of El Capitan. I haven't the slightest idea why it would be happening, though, and it still looks like an OS issue. If someone who's running into it wants to dig in and see if they can find the root cause so we can maybe find a workaround, that would be appreciated.


I had trouble installing Jekyll too, and according to issue 3807 there, it seems the issue is Apple not bundling the Ruby development headers. I seem to have (kind of) solved it by running rvm install ruby-2.2-head --disable-binary.

Now, Sass works, but only after running rvm list every time I want to use it.


I had to do the rootless thing to make sass and compass work. sudo nvram boot-args="rootless=0"; sudo reboot


Upgrading the Ruby version to 2.2.2 as per this instruction did the trick for me. You will also need to add the local .rbenv binary path (/Users/username/.rbenv/versions/2.2.2/bin) to your bash profile for convenience.

ousenko commented Aug 12, 2015

Using home-brew or custom $GEM_HOME can help resolving the issue.
I made an installation of ruby via brew:

brew install ruby

Now the gem stuff seem to happen relative to my /usr/local/bin*

miklb commented Aug 20, 2015

In case anyone else runs across this, latest public beta (5) resolves the Ruby issues, at least for me after updating my gems.


I'm on El Capitan Beta 6 and still having the same trouble.
Made a fresh install of all Homebrew/Ruby/Rails and still have it :(


This should get you up and running: sudo gem install -n /usr/local/bin GEM_NAME_HERE

astrism commented Sep 10, 2015

@endoplasmic that worked for me thanks! 👍


@unclenorton 's link to Gorails ruby upgrade instructions worked for me


@endoplasmic, thanks it worked.

miklb commented Sep 11, 2015

I'm a Ruby n00b, but from what I've read, and being a perpetual beta user in all things dev, slowing down and re-reading everything works.

I did a clean install of Homebrew, used rbenv and triple checked all of the paths in my shell (that last part was key).

Also, take said n00b at face value, but using sudo with Ruby on a Mac sounds like a disaster long term from what I've extensively researched.


@endoplasmic Thank you. it worked.

TalD commented Sep 12, 2015

@endoplasmic, thank you for the right solution.

yanwsh commented Sep 14, 2015

@endoplasmic Thank you so much, it's working.


Work like a charm! Thx! @endoplasmic

wKoza commented Sep 19, 2015

THx @endoplasmic !


Works perfectly with @endoplasmic command line ! Thx !


@endoplasmic, this -n /usr/local/bin works for sass and stringex, but doesn’t for jekyll

$ sudo gem install -n /usr/local/bin jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150930-3326-qv7utq.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/fast-stemmer-1.0.2/gem_make.out
@busches busches referenced this issue in Swiip/generator-gulp-angular Oct 1, 2015

RubySass Error in plugin #821


Thank you so much @endoplasmic! You saved the day.


@pepelsbey Just dropping a line to report that installing Jekyll to /usr/local/bin DID work for me. I'm no Rubyist, so I'm not sure I can offer much beyond that, but wanted to throw it out there!


Oh, and I must also thank @endoplasmic – I didn't even know you could specify a directory to drop the binaries. Awesome!


Thank you so much @endoplasmic rock!

r1seUp commented Oct 2, 2015

thank you guys it worked for me using @unclenorton's suggestion to reinstall Ruby and @endoplasmic's way for installing gems

aufmkolk commented Oct 2, 2015

Thank you @endoplasmic, this saved me some headaches!

bferioli commented Oct 2, 2015

@endoplasmic ❤ /thanks

ravenjam commented Oct 2, 2015

@endoplasmic This is the solution, thanks


Thanks @endoplasmic 👍


@endoplasmic 👍 thanks

L1lle commented Oct 3, 2015

@endoplasmic thanks worked for me as well


Thank @endoplasmic that worked for me. Cheers 👍 👍

soberman commented Oct 3, 2015

@endoplasmic you're the man!


@endoplasmic 👍 thanks

mehanig commented Oct 5, 2015

@endoplasmic much kudos!

webfacer commented Oct 6, 2015

@endoplasmic it worked! very helpful! thx!

Trullus commented Oct 6, 2015

@endoplasmic Worked like a charm, thank you!

snide commented Oct 6, 2015

Just a note that if you run bundle and have your gulp or grunt tasks set to bundle_exec: true, you'll also need to make sure to update your bundle as well. Simply reinstalling bundle (similar to reinstalling sass / compass above) and then running a new bundle install should get you running properly again.


@endoplasmic you saved the day! Thank you so much!


@endoplasmic === legend.

shrekuu commented Oct 8, 2015

@ousenko Thanks. I believe installing this more recent ruby is better 😄

@zackphilipps zackphilipps referenced this issue in badsyntax/SassBeautify Oct 9, 2015

No such file or directory #11


@endoplasmic - Lifesaver!!


thank you @endoplasmic , it works with sudo gem install -n /usr/local/bin compass.


Good lookin @ousenko and @endoplasmic, worked like a charm!

jimmyko commented Oct 17, 2015

Thanks @endoplasmic. It rocks.


Thank you @endoplasmic. it works!


Thanks @endoplasmic ! ;)


That did it--thanks @endoplasmic


@endoplasmic Thanks mate!! That did the trick.


Due to Apple System Integrity Protection ( it's impossible to write in the default folder /usr/local/bin.
sudo gem install sass --install-dir /usr/local
Not the /usr/local/bin because the installer creates the bin folder.


@endoplasmic Thank you so much! It worked for me.


The solution presented by @endoplasmic worked for me as well. Thank you!

Macstyg commented Nov 13, 2015

@endoplasmic Thanks a lot!


@endoplasmic Cheers!! 💪


If that doesn't work also this will work
brew install ruby
sudo gem install -n /usr/local/bin compass

Dianna commented Nov 19, 2015

@endoplasmic Muchas graciasssssssssss


Thanks @endoplasmic!


@endoplasmic thanks man :)


+1 @endoplasmic, you are definitely the hero of this thread. Cheers

Kofaka commented Nov 27, 2015

Thanks @endoplasmic and @jgacuca567 :) You just saved a ton of my time!


@endoplasmic much appreciated!


@endoplasmic you saved my day! thx!

fatisar commented Dec 12, 2015

Just throwing in my @endoplasmic thanks for the day


@endoplasmic thank you very very very much!


you probably haven't been told this enough yet, but thank you very much @endoplasmic.


@endoplasmic very thanks. so gratitude.

@chriseppstein chriseppstein locked and limited conversation to collaborators Jan 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.