-
Notifications
You must be signed in to change notification settings - Fork 366
Best Practice: Never install gems with sudo
Joshua Moody edited this page Dec 9, 2015
·
5 revisions
Using sudo is inherently dangerous. Executing a gem install with sudo is even more dangerous because gems can execute code at install time. This means they could erase parts of your hard drive or publish sensitive information to the internet. Installing gems with sudo on MacOS can overwrite the pre-installed system gems which could cause internal MacOS and Xcode tools to fail.
- https://github.com/wmorgan/killergem
- https://twitter.com/timcharper/status/26202857990
Still not convinced? See what others have to say:
- https://robots.thoughtbot.com/psa-do-not-use-system-ruby
- http://stackoverflow.com/questions/2119064/sudo-gem-install-or-gem-install-and-gem-locations
For users just getting started with ruby and Calabash, we recommend the calabash-sandbox:
For experienced users, we recommend a managed ruby environment.