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

Cannot install bolt with ruby v3.0.0 #2767

Closed
renich opened this issue Apr 6, 2021 · 10 comments · Fixed by #3093
Closed

Cannot install bolt with ruby v3.0.0 #2767

renich opened this issue Apr 6, 2021 · 10 comments · Fixed by #3093
Assignees
Labels
Blocked Work blocked by other issues or PRs. Bug Bug reports and fixes.

Comments

@renich
Copy link

renich commented Apr 6, 2021

Describe the Bug

When trying to install bolt in Fedora 34; with ruby 3.0.0, iit fails; informing me about the ruby version required by ruby 3.5.0.

Expected Behavior

It should just work.

Steps to Reproduce

Steps to reproduce the behavior:

  1. gem -Vu install bolt

Environment

  • Version 3.5.0
  • Platform Fedora 34

Additional Context

Here's what happens when I run it:

[renich@introdesk ~]$ gem install -Vu bolt
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/bolt
200 OK
Successfully installed bolt-0.0.1
1 gem installed

[renich@introdesk ~]$ gem install -Vuv 3.5.0 bolt
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/bolt
200 OK
ERROR:  Error installing bolt:
	bolt-3.5.0 requires Ruby version ~> 2.5. The current ruby version is 3.0.0.0.
@renich renich added the Bug Bug reports and fixes. label Apr 6, 2021
@lucywyman
Copy link
Contributor

Hi! Thanks for raising this. As you might have seen Bolt supports Ruby 2.5+ and is developed, built, tested, and ships with Ruby 2.7. We need to maintain support for 2.5+ because Bolt is a dependency of many other Puppet projects that are on the Ruby 2.x series, and adding support for Ruby 3.0 (which presumably has breaking changes with Ruby 2.x, given it's a major version bump) would be difficult. This will probably happen eventually, but I don't see it being prioritized anytime soon.

In the meantime, like I said Bolt ships with it's own Ruby that should work alongside your system Ruby. We're typically pretty good at picking up new versions as soon as our internal CI allows, hopefully we'll have Fedora 33 available soon (it looks like Fedora 34 won't be released until about 2 weeks from now?). You could try installing the Fedora 32 package https://puppet.com/docs/bolt/latest/bolt_installing.html#install-bolt-on-fedora and see if it works, I know users have done that in the past successfully.

@renich
Copy link
Author

renich commented Apr 7, 2021

I hope you do soon.

@lucywyman
Copy link
Contributor

Ok, after more consideration we think it's worth the effort to add a CI matrix cell for Ruby 3.0 and loosen the restrictions. We'll make sure that Bolt works with Ruby 3 first, and if it does update the gem file.

lucywyman added a commit to lucywyman/bolt that referenced this issue Apr 9, 2021

Verified

This commit was signed with the committer’s verified signature.
mcollina Matteo Collina
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
lucywyman added a commit to lucywyman/bolt that referenced this issue Apr 9, 2021

Verified

This commit was signed with the committer’s verified signature. The key has expired.
anonrig Yagiz Nizipli
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
lucywyman added a commit to lucywyman/bolt that referenced this issue Apr 9, 2021

Verified

This commit was signed with the committer’s verified signature.
metcoder95 Carlos Fuentes
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
@lucywyman
Copy link
Contributor

It looks like supporting Ruby 3 is going to require some changes to Puppet (see test failures here: #2780), and I don't think the team is ready to prioritize this work if it's more than just updating the gemspec file (which it is). Our plan now is to wait until Puppet officially adds support for Ruby 3.0 and then add it in Bolt.

@renich
Copy link
Author

renich commented Apr 12, 2021

Thank you!

@adreyer
Copy link
Contributor

adreyer commented Apr 21, 2021

The puppet ticket blocking this is https://tickets.puppetlabs.com/browse/PUP-10957

@lucywyman lucywyman added the Blocked Work blocked by other issues or PRs. label Apr 21, 2021
@lybekk
Copy link

lybekk commented Oct 18, 2021

These tickets are now closed/resolved:

Any other blockers for this ongoing pull request: #2987

rileynewton added a commit to lucywyman/bolt that referenced this issue Mar 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@rileynewton
Copy link
Contributor

No longer blocked by the above Puppet concerns, but still blocked by r10k pinning to cri 2.15.10 which depends on Ruby (~> 2.3), puppetlabs/r10k#1135.

@bastelfreak
Copy link
Contributor

r10k will support newer rubies after:

donoghuc pushed a commit to donoghuc/bolt that referenced this issue May 23, 2022
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
donoghuc pushed a commit to donoghuc/bolt that referenced this issue May 23, 2022
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
donoghuc pushed a commit to donoghuc/bolt that referenced this issue May 27, 2022
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
donoghuc pushed a commit to donoghuc/bolt that referenced this issue Jun 1, 2022
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. Now
that 3 has been released and there don't appear to be any changes that
will make Bolt unusable with Ruby 3, we've modified the gemspec to allow
any Ruby greater than 2.5. Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
@beechtom beechtom linked a pull request Jun 1, 2022 that will close this issue
donoghuc pushed a commit to donoghuc/bolt that referenced this issue Jun 2, 2022
Previously, our gemspec limited the Ruby version Bolt could run with to 2.x,
as we didn't know if there would be breaking changes in Ruby 3. This commit updates
the gemspec to no longer confine to ruby 2.  Bolt will continue to ship with Ruby 2.7, so
this only applies to gem installations. This adds test matrices for Ruby
3 to the unit and integration tests.

!feature

* **Bolt can now be run with Ruby 3** ([puppetlabs#2767](puppetlabs#2767))
  Required Ruby version for running Bolt is now simply greater than 2.5,
  rather than between 2.5 and 3.0, allowing Bolt gem installs to run with
  Ruby 3.
donoghuc added a commit to donoghuc/bolt that referenced this issue Jun 2, 2022
This commit updates the ruby task helper to pull in bugfix that allows it to be compatible with ruby 3.

!feature

* **Ruby 3 support for ruby_task_helper** ([puppetlabs#2767](puppetlabs#2767))
  Ship a version (0.6.1) of the ruby_task_helper module that
  is compatable with ruby 3.
beechtom added a commit that referenced this issue Jun 2, 2022
(GH-2767) Allow Bolt to run with Ruby 3.0
@renich
Copy link
Author

renich commented Jun 2, 2022

And it works! \o/
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Work blocked by other issues or PRs. Bug Bug reports and fixes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants