WARNING: This post is ancient and probably wrong.
The RVM installation instructions for Vagrant install RVM as root.
If you want to install it as an unprivileged user, namely vagrant, do this:
# http://rvm.io/integration/vagrant - edited to install for "vagrant" user only
config.vm.provision :shell, path: '/host/path/to/install-rvm.sh', args: 'stable', privileged: false # changed
config.vm.provision :shell, path: '/host/path/to/install-ruby.sh', args: '2.1.1', privileged: false # changedYou can use an unmodified install-rvm.sh:
#!/usr/bin/env bash
curl -sSL https://get.rvm.io | bash -s $1You should modify install-ruby.sh to be:
#!/usr/bin/env bash
source /home/vagrant/.rvm/scripts/rvm # changed, used to be /usr/local/rvm/scripts/rvm
rvm use --default --install $1 # changed, used to not set --default
shift
if (( $# ))
then gem install $@
fiThat’s it!