Skip to content
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

Unable to install latest knife gem using Ruby bundled with chef workstation #2989

Open
jasonwbarnett opened this issue Dec 6, 2022 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@jasonwbarnett
Copy link

Description

Since the recent changes made here, it isn't possible to install the knife gem using Ruby 3.0.3 which is the version of Ruby that ships with the latest version of the Chef Workstation.

Chef Workstation Version

Chef Workstation: 22.10.1013
Ruby Version (embedded in Chef Workstation): 3.0.3p157

Platform Version

  • Red Hat Enterprise Linux 7

Replication Case

  1. Install the latest Chef Workstation (i.e. 22.10.1013)

  2. Create local script, /tmp/script.sh

    #!/bin/bash
    
    mkdir /tmp/knife-issue
    
    cd /tmp/knife-issue
    
    cat > /tmp/knife-issue/Gemfile <<'EOF'
    source "https://rubygems.org/"
    
    gem "chef", "~> 18.0"
    gem "knife", "~> 18.0"
    EOF
    
    /opt/chef-workstation/embedded/bin/bundle install
  3. Execute script

    bash -x /tmp/script.sh

Bundler Output

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Resolving dependencies...
Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    knife (~> 18.0) was resolved to 18.0.185, which depends on
      Ruby (>= 3.1.0)

  Current Ruby version:
    Ruby (= 3.0.3)
@jasonwbarnett jasonwbarnett added the Status: Untriaged An issue that has yet to be triaged. label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant