Error while executing gem...(Gem:FilePermissionError) you don't have write permission for the /usr /local/bin/directory
ERROR:
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bin directory. I got this error while trying to uninstall cocoapods which is installed on the system...and It say,,I don't have write permission for /usr/local/bin/directory/. I have tried giving to all the users, though I tried using admin user and the error will not go away.
Can someone please look into this and provide suitable answers.\
Thanks.
MacBook Pro (13-inch Mid 2012), iOS 10.2.1