-
Notifications
You must be signed in to change notification settings - Fork 112
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
Tapioca::Loader relies on Rails 6+ #239
Comments
paracycle
added a commit
that referenced
this issue
Mar 9, 2021
`Rails.autoloaders` did not exist in Rails pre-6.0, so we should not assume that it will be there. We were faking this by defining an `autoloaders` method on the fake `Rails` module defined in our test repo, but we really should not be doing that. Moreover, we were not actually trying to eager load a Rails app in a way that is compatible with pre-6.0 versions, which this commit aims to add as well. Fixes: #239
This was released as part of v0.4.16, thanks for reporting the error, and please let us know if this is still not enough to eager-load a Rails 5.2 app. |
This was referenced Mar 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run Tapioca dsl on a Rails 5.2.4.4 app and you'll get this:
Given your test suite uses Rails 5.2 I was struggling to work out how it wasn't causing issues for you, but it appears to be because its being monkey patched in:
tapioca/spec/support/repo/config/application.rb
Line 10 in aad17fa
As best I can tell
Rails.autoloaders
is a Zeitwerk thing, or at least a 6 thinghttps://guides.rubyonrails.org/autoloading_and_reloading_constants.html#rails-autoloaders
The text was updated successfully, but these errors were encountered: