-1

While I am trying to install ffi with sudo gem install ffi, I am getting this error.

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.

Can anoyone give any solution for this??

  • Why don't you install the gem locally, in your home? Apple does not allow users to fiddle with their system files. – user1934428 May 26 '22 at 06:42
  • I installed ruby with homebrew but it still asking permission for system file – Asif Syeed May 26 '22 at 06:50
  • If you have to say `sudo` you are using the wrong ruby and the wrong `gem`. Install rbenv and your own ruby, _and configure it_. – matt May 26 '22 at 08:51
  • Does this answer your question? [How to install a gem or update RubyGems if it fails with a permissions error](https://stackoverflow.com/questions/14607193/how-to-install-a-gem-or-update-rubygems-if-it-fails-with-a-permissions-error) – Vadim Belyaev May 26 '22 at 08:52
  • https://www.biteinteractive.com/how-to-get-started-with-pods/ – matt May 26 '22 at 08:53
  • https://stackoverflow.com/a/67445580/341994 – matt May 26 '22 at 08:57

0 Answers0