Wade M.
Wade M.

Reputation: 531

"You don't have write permissions for the /usr/bin directory." when installing Sass using the Gem command

I'm on Mac and I'm trying to install Sass using the command in terminal, "sudo gem install sass". I then enter my password, and everything works fine until this pops up,

"ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory."

I do use sudo, but it still doesn't work, and it's one of those things that you can't give yourself read & write permissions to. Any ideas?

Thanks,

Wade

Upvotes: 53

Views: 48432

Answers (4)

Americana American
Americana American

Reputation: 59

For CocoaPods:

sudo gem install -n /usr/local/bin cocoapods

Upvotes: 5

Amit
Amit

Reputation: 2715

I used the same for bundler.

sudo gem install -n /usr/local/bin bundler.

It works.

Upvotes: 4

Mihail Salari
Mihail Salari

Reputation: 1571

For generamba:

sudo gem install -n /usr/local/bin generamba

Upvotes: 14

Alan Birtles
Alan Birtles

Reputation: 36379

/usr/bin is protected by system integrity protection and is not writeable by anybody even root. You need to run:

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

to install into a writeable directory

Upvotes: 114

Related Questions