Skip to content

Conversation

@eoinkelly
Copy link
Contributor

@eoinkelly eoinkelly commented Dec 18, 2025

Changes

  • Make README.md reference the target_versions.yml file for supported Rails version, avoiding having the supported Rails version hard-coded in an easy to forget place
  • Explicitly add the ostruct gem to the Gemfile to silence a warning from Ruby 3.4.8 about ostruct being removed from default gems in Ruby 4. It's possible Rails 8.1 solves this for us but I think an 8.1 upgrade should be it's own PR so this seems like an ok stop-gap Update: Rails 8.1 doesn't silence this for us.

@G-Rath
Copy link
Contributor

G-Rath commented Dec 18, 2025

fwiw I've already got the Rails 8.1 upgrade done: #632

@eoinkelly
Copy link
Contributor Author

@G-Rath Just checked on #632 branch and the ostruct warning is still there so upgrading Rails didn't fix it

rspec
/Users/eoinkelly/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/virtus-1.0.5/lib/virtus.rb:1: warning: /Users/eoinkelly/.rbenv/versions/3.4.8/lib/ruby/3.4.0/ostruct.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 4.0.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
Also please contact the author of virtus-1.0.5 to request adding ostruct into its gemspec.
/Users/eoinkelly/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/virtus-1.0.5/lib/virtus.rb:1: warning: /Users/eoinkelly/.rbenv/versions/3.4.8/lib/ruby/3.4.0/ostruct.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 4.0.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
Also please contact the author of virtus-1.0.5 to request adding ostruct into its gemspec.

I'll update this PR to reflect that.

@G-Rath
Copy link
Contributor

G-Rath commented Dec 18, 2025

@eoinkelly what variants are you generating with? this doesn't show up in our CI because we run against the lowest version of Ruby we aim to support, and I didn't see this in the Rails app I generated about a week ago.

On my other Rails project that also doesn't have this, virtus is pulled in by axe-core-api and axe-core-rspec, which also pulls in ostruct (along with sshkit).

I have a feeling that #530 might resolve this, which is something I've been meaning to PR anyway (I did it on the aforementioned project, and it actually resulted in a speed increase!)

@eoinkelly
Copy link
Contributor Author

I generated using the config from this repo root (basically the default config) and Ruby 3.4.8. Nothing in this PR is urgent so I'm fine if you want to wait and see how it shakes out @G-Rath

@G-Rath
Copy link
Contributor

G-Rath commented Dec 19, 2025

this doesn't show up in our CI because we run against the lowest version of Ruby we aim to support

fwiw I'm wrong, we apparently use ruby as the ruby-version which means we are using the latest version and the ostruct warning is present:

image

With this new found knowledge, I can also say that #640 does resolve this 🎉

@eoinkelly
Copy link
Contributor Author

Closing in favour of #640 and #644

@eoinkelly eoinkelly closed this Dec 19, 2025
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

Successfully merging this pull request may close these issues.

3 participants