4

I had the Ruby gem Sass installed recently and have been frequently using it for an app I'm working on. Today I went to go run sass --watch scss:css as I normally would and noticed I got the following error:

-bash: sass: command not found

I then tried running the following line and got this output:

~$ sudo gem install sass

ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/sass

I would consider myself a novice when it comes to interpreting shell/bash errors, any suggestions as to what might be causing this?

Update

I've since tried @jperelli's suggestion and got the following (ps I am on Mac OS):

~$ sudo gem update bundler

Updating installed gems
Updating bundler
Fetching: bundler-1.10.5.gem (100%)
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/bundle
Joey Orlando
  • 1,408
  • 2
  • 17
  • 33
  • 1
    How is this a duplicate of that question? I asked two months ago whereas the mentioned question was asked one month ago.. – Joey Orlando Oct 06 '15 at 14:51

2 Answers2

27

If you have still this problem, you may try:

$ sudo gem install -n /usr/local/bin sass

I had almost the same issue (for compass) with the latest update to OS X El Capitan, and it worked for me. Just use it like this:

$ sudo gem install -n /usr/local/bin gem_package_name

Good Luck!

Leo
  • 5,363
  • 5
  • 27
  • 30
0

Maybe you stupmed a bug in bundler itself https://github.com/bundler/bundler/issues/1977

Try upgrading bundler and then installing sass again

sudo gem update bundler
sudo gem install sass

Alternatively, you can install sass from OS repositories

# assuming you use ubuntu
sudo apt-get install ruby-sass
jperelli
  • 6,988
  • 5
  • 50
  • 85