rodjek / librarian-puppet

http://librarian-puppet.com
MIT License
693 stars 209 forks source link

Should the Puppet gem be listed in the Gemspec? #248

Closed razic closed 10 years ago

razic commented 10 years ago

This is a question. But it appears that the Puppet gem is a dependency of librarian-puppet. Should we add it to the gemspec dependencies?

carlossg commented 10 years ago

No, it is only needed for parsing Modulefile in git and path dependencies. We avoid explicitly installing the gem as it might conflict with existing puppet installations See #219

razic commented 10 years ago

When I ran librarian-puppet install without the puppet gem installed, it segfaulted with:

Unable to load puppet. Please install it using native packages for your platform (eg .deb, .rpm, .dmg, etc).
puppet --version returned pid 62189 SIGIOT (signal 6)
/Users/razic/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

A gem install puppet still wasn't enough either. After installing the gem and rerunning librarian-puppet install, I got a different error without the segfault this time:

Unable to load puppet. Please install it using native packages for your platform (eg .deb, .rpm, .dmg, etc).
puppet --version returned pid 62247 exit 1
/Users/razic/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/rubygems_integration.rb:256:in `block in replace_gem': puppet is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /Users/razic/.rbenv/versions/1.9.3-p547/bin/puppet:22:in `<main>'
razic:.puppet razic$ puppet --version

The solution for me was to add gem 'puppet' to my Gemfile.

razic commented 10 years ago

@carlossg I have no dependencies with a Modulefile that are using path or git.

razic commented 10 years ago

It appears to me as if it doesn't matter if it's path or git or implicit. Can't install stdlib.

Puppetfile:

forge "https://forgeapi.puppetlabs.com"

mod 'puppetlabs-stdlib'
carlossg commented 10 years ago

seems that you have a corrupt puppet install or conflicting installations. Try librarian with --verbose and try to reproduce one of the commands that fails

Otherwise please include:

Relevant Puppetfile and Puppetfile.lock files Version of ruby, librarian-puppet, and puppet What distro Please run the librarian-puppet commands in verbose mode by using the --verbose flag, and include the verbose output in the bug report as well.

razic commented 10 years ago

Guess I was corrupted. Can't reproduce anymore. Thats good though! Thanks.