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

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

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

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

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

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

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

@ghelton
Copy link

ghelton commented Sep 10, 2015

@endoplasmic that worked for me thanks! 👍

@jacobmiller
Copy link

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

@stgeorgiev
Copy link

@endoplasmic, thanks it worked.

@miklb
Copy link

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

@endoplasmic Thank you. it worked.

@TalD
Copy link

TalD commented Sep 12, 2015

@endoplasmic, thank you for the right solution.

@yanwsh
Copy link

yanwsh commented Sep 14, 2015

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

@marcuswd
Copy link

Tks, @endoplasmic!

@DannySu09
Copy link

Work like a charm! Thx! @endoplasmic

@wKoza
Copy link

wKoza commented Sep 19, 2015

THx @endoplasmic !

@ghamaide
Copy link

Works perfectly with @endoplasmic command line ! Thx !

@pepelsbey
Copy link

@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

@amberfeinerman
Copy link

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

@jcastelli
Copy link

@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

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

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

@r1seUp
Copy link

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

@afmklk
Copy link

afmklk commented Oct 2, 2015

Thank you @endoplasmic, this saved me some headaches!

@Web3nt
Copy link

Web3nt commented Oct 16, 2015

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

@jimmyko
Copy link

jimmyko commented Oct 17, 2015

Thanks @endoplasmic. It rocks.

@jasewarner
Copy link

Thanks @endoplasmic!

@vineshhpatel
Copy link

Thanks @endoplasmic

@Coolkevs
Copy link

Thank you @endoplasmic. it works!

@rafaelign
Copy link

Thanks @endoplasmic ! ;)

@lukehollis
Copy link

That did it--thanks @endoplasmic

@richardsison
Copy link

@endoplasmic Thanks mate!! That did the trick.

@devilmark84
Copy link

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 commented Nov 13, 2015

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

@ajuliano
Copy link

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

@LesleyMerks
Copy link

Thanks @endoplasmic !

@Macstyg
Copy link

Macstyg commented Nov 13, 2015

@endoplasmic Thanks a lot!

@jamigibbs
Copy link

@endoplasmic Cheers!! 💪

@JamesVanWaza
Copy link

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

@ghost
Copy link

ghost commented Nov 19, 2015

@endoplasmic Muchas graciasssssssssss

@niuserre
Copy link

Thanks @endoplasmic!

@olferuk
Copy link

olferuk commented Nov 25, 2015

@endoplasmic thanks man :)

@AnderUstarroz
Copy link

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

@Kofaka
Copy link

Kofaka commented Nov 27, 2015

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

@uiuco
Copy link

uiuco commented Dec 2, 2015

+1 @endoplasmic and @jgacuca567

@matthewhirsch
Copy link

@endoplasmic much appreciated!

@PokimLee
Copy link

@endoplasmic you saved my day! thx!

@fatisar
Copy link

fatisar commented Dec 12, 2015

Just throwing in my @endoplasmic thanks for the day

@GThatchapit
Copy link

@endoplasmic It Work!

@shiraji
Copy link

shiraji commented Dec 16, 2015

@endoplasmic 👍

@xiaoshier
Copy link

@endoplasmic thank you very very very much!

@xturgorex
Copy link

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

@lukemoderwell
Copy link

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests