Best Practice: Never install gems with sudo

Joshua Moody edited this page Dec 9, 2015 · 5 revisions

You should not use sudo to install gems.

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.

Still not convinced? See what others have to say:

Alternatives

For users just getting started with ruby and Calabash, we recommend the calabash-sandbox:

For experienced users, we recommend a managed ruby environment.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.