Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

aronstrandberg opened this issue Jul 10, 2015 · 73 comments

Comments

@aronstrandberg
Copy link

@aronstrandberg aronstrandberg commented Jul 10, 2015

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
Copy link
Contributor

@nex3 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
Copy link
Contributor

@nex3 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
Copy link
Author

@aronstrandberg aronstrandberg commented Jul 11, 2015

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
Copy link

@chriseppstein chriseppstein commented Jul 13, 2015

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
Copy link

@unclenorton unclenorton commented Aug 8, 2015

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
Copy link

@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
Copy link

@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
Copy link

@Alan-Billi Alan-Billi commented Sep 7, 2015

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
Copy link

@endoplasmic endoplasmic commented Sep 10, 2015

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

@ghelton
Copy link

@ghelton ghelton commented Sep 10, 2015

@endoplasmic that worked for me thanks! 👍

@jacobmiller
Copy link

@jacobmiller jacobmiller commented Sep 10, 2015

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

@stgeorgiev
Copy link

@stgeorgiev stgeorgiev commented Sep 11, 2015

@endoplasmic, thanks it worked.

@miklb
Copy link

@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
Copy link

@gary-Shen gary-Shen commented Sep 11, 2015

@endoplasmic Thank you. it worked.

@TalD
Copy link

@TalD TalD commented Sep 12, 2015

@endoplasmic, thank you for the right solution.

@yanwsh
Copy link

@yanwsh yanwsh commented Sep 14, 2015

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

@marcuswd
Copy link

@marcuswd marcuswd commented Sep 15, 2015

Tks, @endoplasmic!

@sunaiwen
Copy link

@sunaiwen sunaiwen commented Sep 19, 2015

Work like a charm! Thx! @endoplasmic

@wKoza
Copy link

@wKoza wKoza commented Sep 19, 2015

THx @endoplasmic !

@ghamaide
Copy link

@ghamaide ghamaide commented Sep 30, 2015

Works perfectly with @endoplasmic command line ! Thx !

@pepelsbey
Copy link

@pepelsbey pepelsbey commented Sep 30, 2015

@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
@amberstickel
Copy link

@amberstickel amberstickel commented Oct 1, 2015

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

@jcastelli
Copy link

@jcastelli jcastelli commented Oct 1, 2015

@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
Copy link

@jcastelli jcastelli commented Oct 1, 2015

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

@ijmorgado
Copy link

@ijmorgado ijmorgado commented Oct 2, 2015

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

@r1seUp
Copy link

@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
Copy link

@aufmkolk aufmkolk commented Oct 2, 2015

Thank you @endoplasmic, this saved me some headaches!

@Joebobent
Copy link

@Joebobent Joebobent commented Oct 16, 2015

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

@jimmyko
Copy link

@jimmyko jimmyko commented Oct 17, 2015

Thanks @endoplasmic. It rocks.

@jasewarner
Copy link

@jasewarner jasewarner commented Oct 19, 2015

Thanks @endoplasmic!

@vineshhpatel
Copy link

@vineshhpatel vineshhpatel commented Oct 26, 2015

Thanks @endoplasmic

@Coolkevs
Copy link

@Coolkevs Coolkevs commented Oct 27, 2015

Thank you @endoplasmic. it works!

@rafaelign
Copy link

@rafaelign rafaelign commented Nov 1, 2015

Thanks @endoplasmic ! ;)

@lukehollis
Copy link

@lukehollis lukehollis commented Nov 2, 2015

That did it--thanks @endoplasmic

@richardsison
Copy link

@richardsison richardsison commented Nov 8, 2015

@endoplasmic Thanks mate!! That did the trick.

@devilmark84
Copy link

@devilmark84 devilmark84 commented Nov 12, 2015

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.

@d-wren
Copy link

@d-wren d-wren commented Nov 13, 2015

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

@ajuliano
Copy link

@ajuliano ajuliano commented Nov 13, 2015

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

@LesleyMerks
Copy link

@LesleyMerks LesleyMerks commented Nov 13, 2015

Thanks @endoplasmic !

@Macstyg
Copy link

@Macstyg Macstyg commented Nov 13, 2015

@endoplasmic Thanks a lot!

@jamigibbs
Copy link

@jamigibbs jamigibbs commented Nov 16, 2015

@endoplasmic Cheers!! 💪

@JamesVanWaza
Copy link

@JamesVanWaza JamesVanWaza commented Nov 17, 2015

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

@Dianna
Copy link

@Dianna Dianna commented Nov 19, 2015

@endoplasmic Muchas graciasssssssssss

@niuserre
Copy link

@niuserre niuserre commented Nov 24, 2015

Thanks @endoplasmic!

@olferuk
Copy link

@olferuk olferuk commented Nov 25, 2015

@endoplasmic thanks man :)

@AnderUstarroz
Copy link

@AnderUstarroz AnderUstarroz commented Nov 26, 2015

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

@Kofaka
Copy link

@Kofaka Kofaka commented Nov 27, 2015

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

@wangdetong
Copy link

@wangdetong wangdetong commented Dec 2, 2015

+1 @endoplasmic and @jgacuca567

@matthewhirsch
Copy link

@matthewhirsch matthewhirsch commented Dec 5, 2015

@endoplasmic much appreciated!

@PokimLee
Copy link

@PokimLee PokimLee commented Dec 10, 2015

@endoplasmic you saved my day! thx!

@fatisar
Copy link

@fatisar fatisar commented Dec 12, 2015

Just throwing in my @endoplasmic thanks for the day

@GThatchapit
Copy link

@GThatchapit GThatchapit commented Dec 13, 2015

@endoplasmic It Work!

@shiraji
Copy link

@shiraji shiraji commented Dec 16, 2015

@xiaoshier
Copy link

@xiaoshier xiaoshier commented Dec 27, 2015

@endoplasmic thank you very very very much!

@xturgorex
Copy link

@xturgorex xturgorex commented Dec 28, 2015

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

@lukemoderwell
Copy link

@lukemoderwell lukemoderwell commented Dec 31, 2015

@endoplasmic very thanks. so gratitude.

@sass sass 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.