Skip to content

Instantly share code, notes, and snippets.

@jameshilliard
Created December 11, 2013 18:06
Show Gist options
  • Select an option

  • Save jameshilliard/7915439 to your computer and use it in GitHub Desktop.

Select an option

Save jameshilliard/7915439 to your computer and use it in GitHub Desktop.
# --- Ruby ---------------------------------------------------------------------
exec { 'install_rvm':
command => "${as_vagrant} 'curl -L https://get.rvm.io | bash -s stable'",
creates => "${home}/.rvm/bin/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 2.0.0 --latest-binary --autolibs=enabled && rvm --fuzzy alias create default 2.0.0'",
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