Skip to content

Best Practice: Never install gems with sudo

Joshua Moody edited this page Sep 25, 2015 · 5 revisions

Installing gems with sudo?

Have a look at the Xamarin docs for a better way. [2]

Or use a ruby manager like rbenv [3] or rvm [4].

The Calabash iOS and Android devs use rbenv, rvm, and the method described in the Xamarin docs.

The Calabash iOS toolchain is tested with rvm in Travis CI and with rbenv in Jenkins.

Why 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.

Still not convinced? https://robots.thoughtbot.com/psa-do-not-use-system-ruby

Clone this wiki locally