Vagrant – rvm – ruby – puppet installation instructions


In order to install a vagrant box with rvm and puppet following the examples in the ‘Deploying Rails’ book, the updated steps needed are described below.
The two main differences are a) rvm system wide installation as recommended here, and b) the puppet 3.0.1 version support of ruby 1.9.3 here


So below are the steps followed to make it work.

  1. Remove system ruby
  2. Remove script as it adds a path that no longer exists:
  3. Install rvm with system wide installation:
  4. Add vagrant user and any other additional user to the rvm group:
  5. Exit and login back in to install ruby 1.9.3-p327 (current)
  6. install necessary ruby dependencies suggestest by previous command:
  7. Creat a gemset to be used with the desired rvm ruby version:
  8. Use the created gemset to install puppet gem:
  9. Install puppet as the vagrant user and NOT as sudo:
  10. install the puppet user and group as per book instructions:
  11. Optionally create a puppet directory to put manifests and modules and create a .rvmrc file to use specified gemset, by adding the following line to puppet/.rvmrc:
  12. use rvmsudo instead of sudo to apply the puppet scripts: