newcontext-oss/kitchen-terraform

Kitchen-terraform installation failing in Ruby 2.6

navin70 opened this issue · 2 comments

Hi,

Apologies in advance if this is not a right forum to post following issue.

Kitchen-terraform gem installation is failing with "delegate" version dependencies in Ruby 2.6.

chef gem install kitchen-terraform --version 6.0.0

ERROR:  Error installing kitchen-terraform:
        The last version of delegate (>= 0.1.0, < 0.3.0) to support your Ruby & RubyGems was 0.1.0. Try installing it with `gem install delegate -v 0.1.0` and then running the current command again
        delegate requires Ruby version >= 2.7. The current ruby version is 2.6.6.146.

I had to manually install older version of delegate as workaround to support kitchen-terraform in Ruby 2.6

chef gem install delegate -v 0.1.0
Fetching delegate-0.1.0.gem
Successfully installed delegate-0.1.0  

chef gem install kitchen-terraform --version 6.0.0
Successfully installed dry-core-0.7.1
Successfully installed dry-configurable-0.12.1
Successfully installed dry-container-0.8.0
Successfully installed dry-equalizer-0.3.0
Successfully installed dry-initializer-3.0.4
Successfully installed dry-logic-1.2.0
Successfully installed dry-inflector-0.2.1
Successfully installed dry-types-1.5.1
Successfully installed dry-schema-1.7.0
Successfully installed dry-validation-1.6.0
Successfully installed tty-which-0.4.2
Successfully installed kitchen-terraform-6.0.0
12 gems installed

Chef Version

 chef -v
ChefDK version: 4.13.3
Chef Infra Client version: 15.14.0
Chef InSpec version: 4.24.8
Test Kitchen version: 2.8.0
Foodcritic version: 16.3.0
Cookstyle version: 5.23.0

Hi @Navin70! Thank you for your interest in the project.

The issue that you're facing is expected, actually. Installing Ruby gems without the use of Bundler means that there will be no guarantee that all of the required dependencies are also installed. This issue is discussed in more detail in the README section Installation: Kitchen-Terraform Ruby Gem.

Thanks for the response @aaron-lane