-1

This is the massage I am getting

IMTIAZs-MacBook-Pro:~ imtiazahmed$ gem install bundle ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. IMTIAZs-MacBook-Pro:~ imtiazahmed$

Please help me to solve this.

Thanks

imtiaz ahmed
  • 3
  • 1
  • 2

2 Answers2

0

Im on macos big sur 11.6 I had to export ruby to my path in the terminal

export PATH="/Users/okerajohnson/.gem/ruby/2.6.0/bin:$PATH"

and even after that regularly typing gem install gem_name still gave me permission error so I have to do

gem install gem_name --user-install
Gilder
  • 126
  • 2
  • 6
-1

Installing gem or updating RubyGems fails with permissions error

Axel Tetzlaff
  • 1,355
  • 8
  • 11
  • Hi axel thanks for your link what I have learn with this is that I have ruby version. 2.0.Op481 installed in my mac book pro os X 10.10.3 and I don't have permission to install gem bundle so what you suggest me to do as I am completely new in the mac and ruby please guide me and help me for proper installation thanks – imtiaz ahmed Aug 11 '15 at 15:50
  • But I have already done some installation in my terminal like xcode ,homebrew , rbenv from homebrew mySq and sublime text 2 so in this case what you want me to do? – imtiaz ahmed Aug 11 '15 at 16:11
  • then maybe you're terminal is still not using the right ruby.. `which ruby` should point to s.th. like `/Users/your_user/.rbenv/shims/ruby` if it doesnt your shell isnt configured corectly or you have ot restart it if you havent until installing. Have you added `eval "$(rbenv init -)" ` to your `/.bash_profile` – Axel Tetzlaff Aug 11 '15 at 16:18
  • So I have to restall the ruby and rails with the link u gave me thanks – imtiaz ahmed Aug 11 '15 at 18:02