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

Closed
aronstrandberg opened this Issue Jul 10, 2015 · 73 comments

Projects

None yet
@aronstrandberg

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

Thoughts?

@nex3
Contributor
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
Contributor
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.

@aronstrandberg

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.

@chriseppstein
Member

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

https://twitter.com/cochinet/status/620624513919684609

@unclenorton

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
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
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.

@Alan-Billi

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 :(

@endoplasmic

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

@astrism
astrism commented Sep 10, 2015

@endoplasmic that worked for me thanks! 👍

@jacobmiller

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

@stgeorgiev

@endoplasmic, thanks it worked.

@miklb
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.

@gary-Shen

@endoplasmic Thank you. it worked.

@TalD
TalD commented Sep 12, 2015

@endoplasmic, thank you for the right solution.

@yanwsh
yanwsh commented Sep 14, 2015

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

@sunaiwen

Work like a charm! Thx! @endoplasmic

@wKoza
wKoza commented Sep 19, 2015

THx @endoplasmic !

@ghamaide

Works perfectly with @endoplasmic command line ! Thx !

@pepelsbey

@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
Closed

RubySass Error in plugin #821

@amberstickel

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

@jcastelli

@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!

@jcastelli

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

@ijmorgado

Thank you so much @endoplasmic ...you rock!

@r1seUp
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
aufmkolk commented Oct 2, 2015

Thank you @endoplasmic, this saved me some headaches!

@bferioli
bferioli commented Oct 2, 2015

@endoplasmic ❤ /thanks

@ravenjam
ravenjam commented Oct 2, 2015

@endoplasmic This is the solution, thanks

@eneserdogan

Thanks @endoplasmic 👍

@atakangktepe

@endoplasmic 👍 thanks

@L1lle
L1lle commented Oct 3, 2015

@endoplasmic thanks worked for me as well

@guygunaratne

Thank @endoplasmic that worked for me. Cheers 👍 👍

@soberman
soberman commented Oct 3, 2015

@endoplasmic you're the man!

@ilkeryilmaz

@endoplasmic 👍 thanks

@mehanig
mehanig commented Oct 5, 2015

@endoplasmic much kudos!

@webfacer
webfacer commented Oct 6, 2015

@endoplasmic it worked! very helpful! thx!

@Trullus
Trullus commented Oct 6, 2015

@endoplasmic Worked like a charm, thank you!

@snide
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.

@KevinSleegers

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

@ampersanddigital

@endoplasmic === legend.

@shrekuu
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
Closed

No such file or directory #11

@jpieterse84

@endoplasmic - Lifesaver!!

@windmaomao

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

@Joebobent

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

@jimmyko
jimmyko commented Oct 17, 2015

Thanks @endoplasmic. It rocks.

@Coolkevs

Thank you @endoplasmic. it works!

@rafaelign

Thanks @endoplasmic ! ;)

@lukehollis

That did it--thanks @endoplasmic

@richardsison

@endoplasmic Thanks mate!! That did the trick.

@devilmark84

Due to Apple System Integrity Protection (http://apple.stackexchange.com/questions/208764/cant-write-to-usr-lib) 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.

@clampdown

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

@ajuliano

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

@Macstyg
Macstyg commented Nov 13, 2015

@endoplasmic Thanks a lot!

@jamigibbs

@endoplasmic Cheers!! 💪

@jgacuca567

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

@Dianna
Dianna commented Nov 19, 2015

@endoplasmic Muchas graciasssssssssss

@niuserre

Thanks @endoplasmic!

@EnlightenedCSF

@endoplasmic thanks man :)

@AnderUstarroz

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

@Kofaka
Kofaka commented Nov 27, 2015

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

@matthewhirsch

@endoplasmic much appreciated!

@PokimLee

@endoplasmic you saved my day! thx!

@fatisar
fatisar commented Dec 12, 2015

Just throwing in my @endoplasmic thanks for the day

@xiaoshier

@endoplasmic thank you very very very much!

@xturgorex

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

@lukemoderwell

@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.