title: VagrantFile inline script and rvm provisioning
body: <p>I am trying to set versión ruby version in the vagrant user with rvm using the following script into the vagrant file:</p>
  
  <pre><code> config.vm.provision "shell", inline: &lt;&lt;-SHELL
       sudo apt-get -y update
       sudo apt-get -y install git ruby libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
   nodejs
       #Install ruby environment
       curl -sSL https://rvm.io/mpapis.asc | gpg --import -
       curl -L https://get.rvm.io | bash -s stable
       sudo "source ~/.rvm/scripts/rvm"
       echo "source ~/.rvm/scripts/rvm" &gt;&gt; ~/.bashrc
       sudo /usr/local/rvm/bin/rvm install 2.1.5
       rvm 2.1.5 --default
       sudo chown -R vagrant:vagrant /usr/local/rvm/gems/
       gem install middleman   
       git clone  XXXX
       SHELL
  END   
  </code></pre>
  
  <p>Vagrant is returning me the following message:</p>
  
  <pre><code> /tmp/vagrant-shell: line 10: rvm: command not found
  </code></pre>
  
  <p>But if i run the command with the full path it returns me the following message:</p>
  
  <pre><code>/usr/local/rvm/bin/rvm 2.1.5 --default
  
  RVM is not a function, selecting rubies with 'rvm use ...' will not work.
  
  You need to change your terminal emulator preferences to allow login shell.
  Sometimes it is required to use `/bin/bash --login` as the command.
  Please visit https://rvm.io/integration/gnome-terminal/ for an example.
  </code></pre>
  
  <p>Is there anyway to execute the inline script in logging mode or other way to use rvm to set the default version?</p>
  
  <p>Thanks :)</p>