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

Installing r10k Returns Error: Last Version of faraday (~> 2.0) to support your Ruby & RubyGems was 3.0.2 then 2.8.1 #651

Open
SiteDesignUSA opened this issue Mar 31, 2024 · 1 comment

Comments

@SiteDesignUSA
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.29.1

  • Ruby:

  • Distribution:

  • Module version: 11.0.1

How to reproduce (e.g Puppet code you use)

Running puppet agent -t

What are you seeing

Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document --no-document r10k' returned 1: ERROR: Error installing r10k: The last version of faraday (~> 2.0) to support your Ruby & RubyGems was 2.8.1. Try installing it with gem install faraday -v 2.8.1and then running the current command again faraday requires Ruby version >= 3.0. The current ruby version is 2.7.8.225. Error: /Stage[main]/R10k::Install/Package[r10k]/ensure: change from 'absent' to 'present' failed: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document --no-document r10k' returned 1: ERROR: Error installing r10k: The last version of faraday (~> 2.0) to support your Ruby & RubyGems was 2.8.1. Try installing it withgem install faraday -v 2.8.1and then running the current command again faraday requires Ruby version >= 3.0. The current ruby version is 2.7.8.225. Notice: /Stage[main]/R10k::Install::Puppet_gem/File[/usr/bin/r10k]: Dependency Package[r10k] has failures: true Warning: /Stage[main]/R10k::Install::Puppet_gem/File[/usr/bin/r10k]: Skipping because of failed dependencies

What behaviour did you expect instead

no error or failure

Output log

Please see above...

Any additional information you'd like to impart

This was working and then I reinstalled OS (same version: ubuntu 20.04) and then these errors. When i install the gem as recommended i.e. /opt/puppetlabs/puppet/bin/gem install --no-document faraday-net_http -v 3.0.2

it then recommends installing gem -v 2.8.1 (which apparently doesn't exist)

Help!

@gvde
Copy link

gvde commented Apr 26, 2024

I see the same on AlmaLinux9 with puppet-agent-7.30.0-1.el9.x86_64

The ruby version with 7.30.0 is

# /opt/puppetlabs/puppet/bin/ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux]

I had to run

[root@al9puppet etc]# /opt/puppetlabs/puppet/bin/gem install faraday-net_http -v 3.0.2
Fetching faraday-net_http-3.0.2.gem
Successfully installed faraday-net_http-3.0.2
Parsing documentation for faraday-net_http-3.0.2
Installing ri documentation for faraday-net_http-3.0.2
Done installing documentation for faraday-net_http after 0 seconds
1 gem installed
[root@al9puppet etc]# /opt/puppetlabs/puppet/bin/gem install faraday -v 2.8.1
Fetching ruby2_keywords-0.0.5.gem
Fetching faraday-2.8.1.gem
Successfully installed ruby2_keywords-0.0.5
Successfully installed faraday-2.8.1
Parsing documentation for ruby2_keywords-0.0.5
Installing ri documentation for ruby2_keywords-0.0.5
Parsing documentation for faraday-2.8.1
Installing ri documentation for faraday-2.8.1
Done installing documentation for ruby2_keywords, faraday after 0 seconds
2 gems installed

to get it installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants