when install cocoapods get Error? - terminal

I try and gem install cocoapods I get an error :
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
what does it mean???

You need to be root to write into /Library, so you need to use sudo, as the instructions tell you:
$ sudo gem install cocoapods

Related

installing gem in terminal on Mac gives permissions error

I tried to install a gem with gem install test-unit and get the same error each time.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

gem install pry FilePermissionError

When I tried to install pry on terminal, it keeps telling me
$ gem install pry
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0
directory.
I've tried to update gem, using homebrew to install ruby. but still get the same error.
Common Practices when something says what you don't have permission to perform an action:
Try to execute the command with sudo prefix (sudo gem install pry).
Execute the command as root (Not recommended due to potential issues).

Installing ruby gems Error: operation nor permitted - usr/bin/sprockets

Im trying to get rubymine to work but i always keep getting this error "operation not permitted"
Gabriellas-MBP:~ GabriellaKampe$ gem install rails
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Gabriellas-MBP:~ GabriellaKampe$ sudo gem install rails
Password:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/sprockets
Gabriellas-MBP:~ GabriellaKampe$
You don't have permission to write to the gemfile directory of your the ruby version that comes bundled with your OS. What you'll have to do is manage your ruby versions using either rbenv or rvm. I will recommend rbenv and you can follow the guide on these links rbenv rails install Mac OS or rbenv rails install Ubuntu

File permission error when installing gem bundle for ruby

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
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
Installing gem or updating RubyGems fails with permissions error

How to solve "/usr/bin/env: ruby_executable_hooks: No such file or directory"?

I just deploy jekyll in a vps, and config git post-receive hook on it. When I push blog update to vps from my laptop, I run into this error:
remote: /usr/bin/env: ruby_executable_hooks: No such file or directory
I searched for a while, and tried the method proposed in this post: bundle update: env: ruby_executable_hooks: No such file or directory, i.e., executing the commands below:
rvm #global do gem regenerate_binstubs
gem regenerate_binstubs
But it doesn't help, the error remains. Since I'm not familiar with rvm or ruby, could anyone give me a hint?
use wrappers, example:
$ which jekyll
# /path/to/rvm/gems/ruby-version/bin/jekyll
in the returned path replace bin with wrappers so you get:
/path/to/rvm/gems/ruby-version/wrappers/jekyll
this is a script that will load proper environment and fix your problem, wrappers are generated automatically withing RVM.
You need to refresh the executable-hooks to the latest version by running following command in the Terminal:
sudo gem install --user-install executable-hooks
I had the same problem, but I have bundler, not rubygems-bundler, and my gem doesn't recognise regenerate_binstubs.
rvm all-gemsets do gem update bundler installed bundler 1.7.11 and fixed it for me.
Updating ruby gems worked for me
gem install rubygems-update
update_rubygems
faslane env: ruby_executable_hooks: No such file or directory
re-install faslane
sudo gem install fastlane -NV

Resources