JKW
JKW

Reputation: 47

Having issues installing ruby gems after latest OS X El Capitan update

After the latest update it appears a few of my gems have been affected and are either missing/changed.

In particular the gem 'rubocop' is giving me issues as I use atom for a text editor and I have flags popping up.

"Failed to spawn command rubocop. Make sure rubocop is installed and on your PATH"

"Error: spawn rubocop ENOENT"

I've tried re-installing the rubocop gem through the command line and I'm running into this issue:

gem install rubocop Fetching: rainbow-2.1.0.gem (100%) ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Library/Ruby/Gems/2.0.0/rainbow-2.1.0.gem

I've even tried to uninstall the gem but there's no output after running gem uninstall rubocop

I really have no idea where to begin to resolve this and I'd love any help possible!

Upvotes: 0

Views: 210

Answers (2)

Nischay Namdev
Nischay Namdev

Reputation: 593

Make sure you add sudo before gem install rubocop And then go to documentation of rubocop to check which version of ruby it takes to run. You can also install rbenv.its better then rvm (they are ruby version managers your can put multiple versions of ruby on same machine using them) if further you need help .. let me know !

happy coding

Upvotes: 2

tadman
tadman

Reputation: 211580

Don't forget that installing things into the system Ruby requires sudo privileges, /Library is usually restricted access.

Installing your own personal Ruby with rvm or rbenv avoids all this.

Upvotes: 1

Related Questions