Installing gem fails with permissions error on OSX

If your ever have a problem installing or updating a gem in OSX. ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the »