-
Notifications
You must be signed in to change notification settings - Fork 1.4k
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
$ brew info rbenv | tail -7
==> Caveats
Rbenv stores data under ~/.rbenv by default. If you absolutely need to
store everything under Homebrew's prefix, include this in your profile:
export RBENV_ROOT=/usr/local/var/rbenv
To enable shims and autocompletion, run this and follow the instructions:
rbenv init $ rbenv init
# Load rbenv automatically by appending
# the following to ~/.bash_profile:
eval "$(rbenv init -)" Edit your |
@GuoZhiQiang Also, see rbenv-doctor for a script that can detect installation issues for you: https://github.com/rbenv/rbenv-installer#rbenv-doctor |
@jeremy I'm sorry to disturb you ,but where is the .bash_profile ? I cant found it in my root directory. Also not have the directory ~/.rbenv or /usr/local/var ? Please help me again . Thanks very much. |
@GuoZhiQiang did you try rbenv doctor as @mislav suggests? When you run |
it reports that
|
when i run the doctor @mislav have suggested , it reports that
|
Go ahead and put |
Great , thanks ! I'm trying to install Ruby, so i run the command :
The Ruby install failed. What can i do next? @jeremy |
Can you run |
@GuoZhiQiang You still didn't install rbenv properly. Run the rbenv-doctor again to check if rbenv shims directory is in your PATH. |
Apologies to you both: I just logged on following a suggestion in an EdX Python course, and I find this conversation listed in my notifications. Do you know why? Or where should I look to larn meself th basic larnin'? Thanks. |
I have runned the doctor again. It says the PATH is OK:
Is it right? @mislav |
@DavidLJ I'm not sure why. @GuoZhiQiang OK that's a good start. Now, type |
Just to add to what @jeremy and @mislav said: After appending your ~/.bash_profile with I had this same issue with permissions and couldn't even wget rbenv-doctor until I appended ~/.bash_profile and hopped out and back in Terminal Thanks! |
First determine your goal. Is it "I'm not sure I installed
"I want to use
"I want to install a gem on user for a specific version of ruby"
"I want to install a gem globally on my system ruby" |
resolved the issue by trying with sudo that is |
Thank you! This was super helpful:) |
Setting rbenv version as global worked for me! Thanks @hfossli ! |
Thanks everyone. Had this issue today and got to solve it following the instructions give here 👍 |
yanlideMacBook-Pro:hijiangtao.github.io yanli$ brew info rbenv | tail -7 And How to fix? |
ERROR: While executing gem ... (Gem::FilePermissionError) Getting this error while installing cocoapods. Even not a single command is executing. |
A similar situation Do NOT think a You need to make sure when you call You can try:
|
Super helpful! |
So for me, after MANY hours of trying to figure this out, switching to the new rbenv version (i.e. changing from system to the new version) did the trick.
|
Unfortunately, none of these solutions worked for me. What ultimately worked? I don't know that it's the *right way to do it, but it unblocked me, so I'm happy with it for now. |
Same situation. Your code works. Thank you!
|
Please don't use Instead, ensure that rbenv is installed correctly and that you've selected a version other than |
I have installed Hombrew .And have rbenv installed by
brew install rbenv
. But when i rungem install bundler
,it said :You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory
. I want to install Bundler to manage gems, but it failed. Maybe something wrong with me ,can you help me ?The text was updated successfully, but these errors were encountered: