-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gems not found in pre-release #254
Comments
Dan, was this addressed, or caused by #249? Can you retest with current master, or the released 1.0.0 gem? |
$ gem list pdk *** LOCAL GEMS *** pdk (1.0.0) $ pdk validate pdk (FATAL): Unable to install requested binstubs. $ gem list rubocop *** LOCAL GEMS *** rubocop (0.49.1) |
Errr... apologies, I should have noticed that earlier. The rubocop gem doesn't need to be installed in the system gems. All requirements will be pulled in through the module's Gemfile, which should be correctly set up by If you're available, I'd love to talk to you for a few minutes about your use-case, so that we can ensure future planning catches up with your requirements. Local repro:
|
I have a similar issue, albeit with the new version 1.0.1 of pdk: $ pdk validate
pdk (INFO): Running all available validators...
[✖] Installing missing Gemfile dependencies
pdk (FATAL): Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
You have requested:
puppet ~> 3.8
The bundle currently has puppet locked at 5.0.1.
Try running `bundle update puppet`
If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`
pdk (FATAL): Unable to install missing Gemfile dependencies.
$ pdk --version
1.0.1 bundle command "missing" tooThere is no command $ find /opt/puppetlabs/pdk/ -name bundle
/opt/puppetlabs/pdk/private/ruby/2.1.9/bin/bundle
/opt/puppetlabs/pdk/private/ruby/2.1.9/lib/ruby/gems/2.1.0/gems/bundler-1.15.1/exe/bundle
/opt/puppetlabs/pdk/share/cache/ruby/2.1.0/bin/bundle
/opt/puppetlabs/pdk/share/cache/ruby/2.1.0/gems/bundler-1.15.1/exe/bundle When I run the suggested bundle command from above (as an unprivileged user) I do get a dependency error:
Looks like there are a few issues to fix to make this work seamlessly. (Sorry that I can't be more specific in suggesting a solution as I'm not too practical with Ruby!) My use caseI'm really just trying to lint a puppet module that I'm modifying (without installing The system I'm working on is a rather freshly installed Ubuntu 17.04 Zesty box (with Bash as a default shell and a Cinnamon desktop). |
More trouble-shooting on the above issue with bundle: Running $ /opt/puppetlabs/pdk/private/ruby/2.1.9/bin/bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.......................................................................................................
Fetching rake 12.0.0
Fetching json 1.8.6 (was 1.8.1)
Fetching addressable 2.4.0 (was 2.5.1)
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Installing ... (COMMENT: several packages are being listed)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/opt/puppetlabs/pdk/private/ruby/2.1.9/bin/ruby extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.2.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/puppetlabs/pdk/private/ruby/2.1.9/bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20170909-9501-6hh7qunokogiri-1.8.0/gems/nokogiri-1.8.0 for inspection.
Results logged to /tmp/bundler20170909-9501-6hh7qunokogiri-1.8.0/extensions/x86_64-linux/2.1.0/nokogiri-1.8.0/gem_make.out
An error occurred while installing nokogiri (1.8.0), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.0'` succeeds before bundling.
In Gemfile:
beaker-rspec was resolved to 5.6.0, which depends on
beaker was resolved to 2.52.0, which depends on
aws-sdk-v1 was resolved to 1.67.0, which depends on
nokogiri |
|
@DavidS Was this addressed to me? I'm just reporting what doesn't work from the perspective of an end-user. I'm neither a PDK nor a Ruby developer, remember. Bottom-line: PDK is useless for me and my team in the current state (apart from being able to run IIUC and you implicitly suggest a PDK-only workflow, that deserves being fixed. (Call it "a usability issue", but a serious one.) |
@bittner yes, that was adressed to you. The pdk has a
(Using --debug only for demonstration purposes here) I've checked nokogiri, and we do not ship a copy of that anymore, my apologies for confusing that. I also feel compelled to point out that neither puppet 3.8, nor beaker 2 will receive any official updates, testing, or support from our side. |
I have no idea what this means. I have not chosen to install those components. Those versions get installed automatically with either the base system (we're running a fresh Foreman installation) or the PDK. Our own Puppet control repository is actually targeted at somewhat the latest Puppet version that corresponds to stable PE (I thought that was 4.x). |
That is very curious, since the logs you've posted show both versions being requested by your module. Can you (privately, even) hook me up with a copy of the module you are working on? |
You may be right. I think I produced the output above with https://github.com/edestecd/puppet-software Though, that sounds like a different issue. Originally, I had the same or a very similar problem with our control repository. |
I looked at that repo, and its
We're planning to provide an |
Going to close this issue. The convert and update features added to PDK should help transition older modules to be used with PDK. Those that can't be changed in that manner with the default template, can fork and customize the pdk-templates at https://github.com/puppetlabs/pdk-templates |
$ pdk --version
1.0.0.pre
$ pdk validate
pdk (DEBUG): PDK package installation not found, trying 'bundle' from the system PATH instead
pdk (DEBUG): Executing 'bundle binstubs rubocop --force'
pdk (DEBUG): Execution of 'bundle binstubs rubocop --force' complete (duration: 0.39786395s; exit code: 7)
pdk (FATAL): Failed to generate binstubs for 'rubocop':
Could not find gem 'rubocop'.
$ gem list rubocop
*** LOCAL GEMS ***
rubocop (0.49.1)
The text was updated successfully, but these errors were encountered: