Avoiding apt-get update when installing Ruby via RVM on Ubuntu

1 minute read

One of the best practices for installing RVM (BTW: one of the greatest tools available when working with Ruby) is to install it as regular user (and not as root).

But if you try to install a new Ruby version via, e.g.

    rvm install 1.9.3

you may get a prompt for your root password, since rvm is trying to update your operating system.

To avoid this, simply disable the autolibs feature of rvm:

    rvm autolibs disable
    rvm install <whatever version you want to install>

However, you should make sure that your system is up to date by running

    apt-get --quiet --yes update