-
Notifications
You must be signed in to change notification settings - Fork 7
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
stringio redefined warnings #245
Comments
Try removing toys from the bundle and see if that helps. Otherwise I'll take another look. |
I spent a few moments looking at this today. One workaround I found is to tell Toys to manage the bundle, rather than depending on Rails to do the bundle setup in boot.rb. You can do this by adding expand :minitest, files: ["test/**/*_test.rb"], libs: ["test", "lib"], bundler: true As for why we're getting the stringio issue with Rails, I haven't yet connected all the dots, but has something to do with Toys using stringio, then Rails loading a different version in its bundle. As with the other issue you filed, the root of the problem seems to be that Rubygems isn't recognizing stringio properly as a built-in gem, and is allowing multiple versions of it to load. For example, you can reproduce the issue without Toys, just by adding |
I released a workaround in Toys 0.15.3. Turns out that Minitest itself was doin the initial pre-bundle loading of stringio, so I moved |
I was trying to narrow down an issue for something else and stumbled across some weird stringio conflicts again.
I did:
Then I created a
.toys.rb
with this as the content:When running
rake test
I have no issues, but if I runtoys test
I get:This is with the latest toys
0.15.2
, ruby3.2.2
, and rails7.1.1
on macOS Sonoma (14.0)The text was updated successfully, but these errors were encountered: