nwops / puppet-retrospec

The only tool you need to generate puppet code, tests, modules, facts, types, providers, data and everything else.
https://www.retrospec-puppet.com/
GNU Affero General Public License v3.0
137 stars 27 forks source link

'Incompatible plugin version with new templates' error #48

Closed haani-niyaz closed 8 years ago

haani-niyaz commented 8 years ago

When running puppet-retrospec I get the following error:

Error running hook: /home/vagrant/.retrospec/repos/retrospec-puppet-templates/clone-hook
Newer version of retrospec-puppet detected, please update: gem update puppet-retrospec
Incompatible plugin version with new templates, will not continue without update

Despite updating puppet-retrospec it still gives me the same error.

vagrant$ bundle show puppet-retrospec
/home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/puppet-retrospec-0.12.0
logicminds commented 8 years ago

I think bundler might be the cause. Can you install puppet-retrospec outside of bundler.

haani-niyaz commented 8 years ago

@logicminds , This has previously worked with bundler. I get the same result either way. Something I missed sharing was that it does eventually run however it does not create the boilerplate spec files:

Successfully ran hook: /home/vagrant/.retrospec/repos/retrospec-puppet-templates/pre-hook

!! /etc/puppet/modules/tc_test/.bundle/config already exists
!! /etc/puppet/modules/tc_test/.fixtures.yml already exists and differs from template
!! /etc/puppet/modules/tc_test/.git/hooks/pre-commit already exists and differs from template
!! /etc/puppet/modules/tc_test/.gitignore already exists and differs from template
!! /etc/puppet/modules/tc_test/.puppet-lint.rc already exists
!! /etc/puppet/modules/tc_test/.travis.yml already exists
!! /etc/puppet/modules/tc_test/Gemfile already exists
!! /etc/puppet/modules/tc_test/README.markdown already exists
!! /etc/puppet/modules/tc_test/Rakefile already exists
!! /etc/puppet/modules/tc_test/Vagrantfile already exists
 + /etc/puppet/modules/tc_test/files/.gitkeep
!! /etc/puppet/modules/tc_test/spec/shared_contexts.rb already exists and differs from template
!! /etc/puppet/modules/tc_test/spec/spec_helper.rb already exists
 + /etc/puppet/modules/tc_test/templates/.gitkeep
 + /etc/puppet/modules/tc_test/tests/.gitkeep

Any idea why this might be..?

logicminds commented 8 years ago

https://github.com/nwops/retrospec-templates/blob/master/clone-hook#L92

This was some new code I added to the templates. This would be the culprit. For some reason its finding an older version or something on your system. I am not sure if this works correctly using bundler: https://github.com/nwops/retrospec-templates/blob/master/clone-hook#L80.

logicminds commented 8 years ago

As for the reason why it would not create the spec files. I assume you have some manifests?

I will make a small change to the clone hook which should allow you to update the templates. I have never seen this though. You will need to issue a git pull inside /home/vagrant/.retrospec/repos/retrospec-puppet-templates to get the latest templates once I make the change.

haani-niyaz commented 8 years ago

Thanks. Your probably right about this being a bundler issue but any help is appreciated!

logicminds commented 8 years ago

Could be a rbenv issue. The hooks use /usr/bin/env ruby so whatever that executes might lead to the problem.

logicminds commented 8 years ago

any update on this?

logicminds commented 8 years ago

The original issue was fixed in a change to the clone hook. For the other issue please refer to #51