• Register
0 votes
242 views

Problem :

I am trying to install the gem using gem install mygem or update a RubyGems using gem update --system, and it fails with below error:

ERROR:  While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

Does anyone have the idea how to fix this error?

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

“You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.”

The above error means exactly that, you don't have permission to write there. That is a version of Ruby installed by the Apple, for their own use. While it is OK to make the minor modifications to that if you really know what you are doing, as you are not sure about a permissions problem, I would say it is not the good idea to continue with that track.

Instead, I will strongly suggest you to look into it by using either rbenv or RVM to manage the separate Ruby, installed into the sandbox in the home directory, that you can modify/fold/spindle/change without ever worrying about the messing up a system Ruby.

Between the two, I use the rbenv, though I used a RVM a lot in a past. rbenv takes the more "hands-off" approach to managing the Ruby installation. RVM has the lot of features and is very powerful, but, as the result is more intrusive. In either case, need to READ the installation documentation for them for a couple times before starting to install whichever you want to pick.

9 7 4
38,600 points

Related questions

0 votes
1 answer 732 views
732 views
Problem : I want to run the specs, you will need to install RSpec. First, run the gem install bundler in a root directory of the project. Then, run the bundle install. To run the single spec file, run the command like below: bundle exec rspec spec/00_hello_spec.rb. To ... ruby, and I want to bundle install inside of the atom? Could anyone tell me how to use the atom or run anything in the atom?
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 68 views
68 views
Problem: I am learning ruby and I have updated XCode on my Mac and since then when I run Docker using docker-sync-stack startI get the following error: mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/ ... :, brew install rbenv ruby-buildbut that doesn't change anything. Does anyone have idea how I should fix this? I will be thankful!
asked Dec 2, 2020 sasha 16.2k points
0 votes
1 answer 86 views
0 votes
1 answer 34 views
0 votes
1 answer 3 views
3 views
Problem: Please help me fix this dilemma “Mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h”?
asked Apr 5 tuhin1 48.4k points
0 votes
1 answer 1 view
1 view
Problem: Run `bundle install` to install missing gems.I'm trying to install a Ruby based tool call Warvox and when I try to do a "make", I get the following error.Any advise/suggestions?
asked 1 day ago Humaira ahmed 9.6k points
0 votes
1 answer 4 views
4 views
Problem: I'm trying to install a Ruby-based tool call Warvox and when I try to do a "make", I get the following error: Run `bundle install` to install missing gems. However ever after installing the missing gem, the error is still the same. Any advice/suggestions.
asked Mar 27 ummesalma 24.5k points
0 votes
1 answer 42 views
42 views
Problem: Hello Kodlogs, I was working on an app I want to deploy for use within my business but I was faced with a hosting issue so I decided to fix it with Heroku using a custom domain and I got this error: installing doc 3.12.2 installing pg 0.15.1 an ... failed to install gems via bundler. ! ! detected sqlite3 gem which is not supported on heroku. ! ! push rejected, failed to compile ruby app
asked Jan 14 Festus James 380 points
0 votes
1 answer 49 views
49 views
Problem: Hello Kodlogs, I encountered a strange issue where vagrant works fine for a while and it completely stops working unexpectedly. Afterward, any of the vagrant commands I run just give me this error: "exec error: exec: "ruby": executable file not found in %PATH%"
asked Dec 29, 2020 Festus James 380 points