Skip to content

Instantly share code, notes, and snippets.

@raahede
Created November 23, 2016 09:08
Show Gist options
  • Save raahede/6e360ef9a2ad6312b09d68e2527af6af to your computer and use it in GitHub Desktop.
Save raahede/6e360ef9a2ad6312b09d68e2527af6af to your computer and use it in GitHub Desktop.
Error installing Ruby Gem

Error installing Ruby Gem

If you get a similar error, it means that gem install [gem name] isn't working.

Run this command

sudo gem install -n /usr/local/bin [gem name]

Example

sudo gem install -n /usr/local/bin scss_lint
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! path /Users/simoneldevig/Documents/Sites/S_Custom_GitGadget/S_Custom_GitGadget/sources/node_modules/.staging
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/Users/simoneldevig/Documents/Sites/S_Custom_GitGadget/S_Custom_GitGadget/sources/node_modules/.staging'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, mkdir '/Users/simoneldevig/Documents/Sites/S_Custom_GitGadget/S_Custom_GitGadget/sources/node_modules/.staging'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/simoneldevig/Documents/Sites/S_Custom_GitGadget/S_Custom_GitGadget/sources/node_modules/.staging' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/simoneldevig/Documents/Sites/S_Custom_GitGadget/S_Custom_GitGadget/sources/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment