blt04 / puppet-rvm

A puppet module for installing and using RVM (Ruby Version Manager)
Other
242 stars 280 forks source link

Must Run apt-get update Before RVM Will Install #101

Open jonahbron opened 10 years ago

jonahbron commented 10 years ago

When booting a new system, RVM will not successfully install on the first try. First you must SSH into the box and run sudo apt-get update, then re-run vagrant provision for it to work. Is there a way around this? I tried adding a require to the command, but that had no effect at all. It even shows its acknowledgement of that requirement up in the debug output, but it does not actually run it.

naps62 commented 10 years ago

i'm also seeing this issue

andl commented 10 years ago

since rvm_install is executed brefore main stage https://github.com/blt04/puppet-rvm/blob/master/manifests/init.pp#L2

My workaround is run apt-get update before main stage as well:

stage {'preinstall':
  before => Stage['main']
}
class apt_get_update {
  exec {'apt-get update':
    command => '/usr/bin/apt-get -yq update'
  }
}
class { 'apt_get_update':
  stage => preinstall
}
class {'rvm': }