blt04 / puppet-rvm

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

Could not find default provider error (even with run stages) #41

Open rwilcox opened 12 years ago

rwilcox commented 12 years ago

In Pull Request #39 I talked about my puppet setup, which has a problem finding the default provider, even when I use run stages.

I've uploaded a Vagrantfile + manifests that show the issue (with very few extra Puppet instructions to get in the way: http://www.wilcoxd.com/oss/puppet_rvm_provider_not_found.zip

When I try this with puppet-rvm (this repo) I get:

Could not find a default provider for rvm_system_ruby

But, given that I think everything is set up properly, I don't think I should be getting this error....

Any help would be very much appreciated :)

phuongnd08 commented 12 years ago

I have successfully installed rvm and ruby 1.9.3 in 2 passes (by checking $rvm-installed). I'm now trying to install rvm and ruby in one pass, but always encounter: Could not find a default provider for rvm_system_ruby

(I'm running standalone mode with puppet apply) What I'm trying:

  1. Include rvm from site.pp
  2. Include webserver from site.pp
  3. Declare that webserver depends on webserver::ruby executed in post rvm-install stage:
class webserver {
  include rvm
  stage { "ruby": require => Stage["rvm-install"] }
  class { 
    "webserver::ruby":
      stage => "ruby"
  }
}
  1. Declare that webserver::ruby will install ruby 1.9.3
class webserver::ruby {
  rvm_system_ruby {
    'ruby-1.9.3-p0':
      ensure => 'present',
      default_use => true;
  }
}

Please advice My project is located at https://github.com/phuongnd08/iRes_puppet incase you want a more details look.

rwilcox commented 12 years ago

@phuongnd08 , I would try my fork of puppet-rvm, specifically the "rvm_puppet_works_without_installing_rvm" branch. I'm not an expert puppet user, but I think you may be running into the same problem I was having (and fixed).

That would be my guess.