Search code examples
rubydeploymentrvmsudo

How to install RVM system requirements without giving sudo access for RVM user


On my Debian server I have a user called "deployer" that does not have sudo access, and has RVM installed.

When installing Ruby using "deployer", like 1.9.3, it triggers a task to install dependencies

"Installing requirements for debian, might require sudo password."

which fails and stops installation because "deployer" can not sudo.

I don't want to add "deployer" into the sudoers list, and don't want to install RVM for some other user just for a one-time use for installing dependencies.

What is the correct way to install that dependencies? Or how do I list them to install manually?


Solution

  • This is indeed a new feature of RVM called autolibs, which automatically installs dependencies.

    If you have already installed RVM, and it is asking you for your sudo password, you can disable autolibs:

    $ rvm autolibs disable
    $ rvm requirements # manually install these
    $ rvm install ruby
    

    Otherwise, you can install RVM without autolibs with this command:

    $ \curl -L https://get.rvm.io | bash -s -- --autolibs=read-fail
    

    I understand the motivation, but find it rather annoying. I do not want to put my sudo password into RVM, nor for that matter Bundle! Please community, stop doing this.