Closed atifrasheed79 closed 1 year ago
Got the same issue, looks like it's because this gem installs bundler
without a version specifier:
https://github.com/test-kitchen/busser-serverspec/blob/f8047acb136683e3d4098ada2d379e4d9e5922f5/lib/busser/runner_plugin/serverspec.rb#L28
and Bundler v2 requires Ruby >= 2.3.0: https://rubygems.org/gems/bundler/versions/2.0.0
Thanks @tanob for your analysis. I think you got it right but how you fixed this? because I tried to restrict bundler to 1.17.x in the Gemfile but it's not working. Appreciate your help.
I have also tried to install the problematic gems via bootstrap.sh and I can see they are installed in the "kitchen converge" phase but kitchen still tries to install them during "kitchen verify", not sure why!
All I want is to restrict kitchen-test to use bundler 1.17.3, and I might be missing something somewhere, but both recipe Gemfile and this bootstrap option isn't working for me.
I think this is a duplicate of issue https://github.com/test-kitchen/busser-serverspec/issues/55
Yeah, I was able to work it around by setting the BUSSER_HOME, GEM_HOME, GEM_PATH etc. in UserData (kitchen.yml) for the EC2 instance Kitchen will launch, and bootstrap.sh.
When I enabled debug, I found that Kitchen converge and setup are working in different environment when I was doing "Kitchen test", so I just made sure both steps refer to same GEM environment.
This problem now extends to Ruby >= 2.6.0 as Bundler 2.4 dropped support for older Rubys. This affects eg. Debian 10.
Can this be fixed?
This fork pins bundler and restores compatibility with older Ruby versions: https://github.com/clemblanco/busser-serverspec_chefdk30
Works for me.
Hello there,
Rubygems site states that the subject gem should work with any Ruby version but on Redhat during "Kitchen exec kitchen test", it's asking for Ruby >= 2.3.0. I have pasted the logs for your kind review, will appreciate any help in this regard. Thanks.
Fetching: busser-0.7.1.gem (100%) Successfully installed busser-0.7.1 2 gems installed -----> Installing Busser plugin: busser-serverspec Plugin serverspec installed (version 0.5.10) -----> Running postinstall for serverspec plugin /usr/share/rubygems/rubygems/installer.rb:518:in'
from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/command.rb:27:in '
ensure_required_ruby_version_met': bundler requires Ruby version >= 2.3.0. (Gem::InstallError) from /usr/share/rubygems/rubygems/installer.rb:781:in
pre_install_checks' from /usr/share/rubygems/rubygems/installer.rb:216:ininstall' from /usr/share/rubygems/rubygems/dependency_installer.rb:374:in
block in install' from /usr/share/rubygems/rubygems/dependency_installer.rb:337:ineach' from /usr/share/rubygems/rubygems/dependency_installer.rb:337:in
each_with_index' from /usr/share/rubygems/rubygems/dependency_installer.rb:337:ininstall' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/rubygems.rb:44:in
install_gem' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/helpers.rb:57:ininstall_gem' from /tmp/verifier/gems/gems/busser-serverspec-0.5.10/lib/busser/runner_plugin/serverspec.rb:28:in
block inrun' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:126:in
invoke_command' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:inblock in invoke_all' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:in
each' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:inmap' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:in
invoke_all' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/group.rb:232:indispatch' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/base.rb:440:in
start' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/runner_plugin.rb:36:inblock in postinstall' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:80:in
block in run_postinstall' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:100:indrop_ssl_verify_peer' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:80:in
run_postinstall' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:57:ininstall' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:43:in
block (2 levels) in install_all' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:43:ineach' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:43:in
block in install_all' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/rubygems.rb:71:insilence_gem_ui' from /tmp/verifier/gems/gems/busser-0.7.1/lib/busser/command/plugin_install.rb:42:in
install_all' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/command.rb:27:inrun' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:126:in
invoke_command' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:inblock in invoke_all' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:in
each' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:inmap' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:133:in
invoke_all' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/group.rb:232:indispatch' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:115:in
invoke' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor.rb:40:inblock in register' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/command.rb:27:in
run' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:126:ininvoke_command' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor.rb:359:in
dispatch' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:115:ininvoke' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor.rb:235:in
block in subcommand' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/command.rb:27:inrun' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/invocation.rb:126:in
invoke_command' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor.rb:359:indispatch' from /tmp/verifier/gems/gems/thor-0.19.0/lib/thor/base.rb:440:in
start' from /tmp/verifier/gems/gems/busser-0.7.1/bin/busser:8:in<top (required)>' from /tmp/verifier/bin/busser:23:in
load' from /tmp/verifier/bin/busser:23:in `