Skip to content

Instantly share code, notes, and snippets.

@JimBTek
Created August 26, 2013 12:08
Show Gist options
  • Save JimBTek/6340782 to your computer and use it in GitHub Desktop.
Save JimBTek/6340782 to your computer and use it in GitHub Desktop.
# --- Ruby ---------------------------------------------------------------------
exec { 'install_rvm':
command => "${as_vagrant} 'curl -L https://get.rvm.io | bash -s master'",
creates => "${home}/.rvm",
require => Package['curl']
}
exec { 'install_ruby':
# We run the rvm executable directly because the shell function assumes an
# interactive environment, in particular to display messages or ask questions.
# The rvm executable is more suitable for automated installs.
#
# Thanks to @mpapis for this tip.
command => "${as_vagrant} '${home}/.rvm/bin/rvm install 1.9.3 --latest-binary && ${home}/.rvm/bin/rvm --default use 1.9.3 --latest-binary'",
creates => "${home}/.rvm/bin/ruby",
require => Exec['install_rvm']
}
exec { "${as_vagrant} 'gem install bundler --no-rdoc --no-ri'":
creates => "${home}/.rvm/bin/bundle",
require => Exec['install_ruby']
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment