-
Notifications
You must be signed in to change notification settings - Fork 92
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
Regression regarding unavailable database in 4.x+ versions #187
Comments
(A side note, the adjustments made to |
Hey! Yep, I tried to find a workaround for this and failed to find a substitution, since, as mentioned in the Rails repo, it's the internal part of the framework |
@DmitryTsepelev So, in the meantime I was able to reproduce the issue we were seeing on CI locally by mirroring the setup flow I described above locally, improving the time it took me to figure out a way how to make the test suite to boot locally again. While this doesn't fix the actual issue (not sure if there is a fix possible as long as no public API is added to rails as mentioned over in rails/rails#52685), at least we can upgrade now and get our CI passing, so maybe anyone who runs into this issue as well can at least remedy it for the time being. I was able to reproduce it for our app by running postgres (in our case postgis, but it should be the same with regular PG) inside docker, and then running specs with a docker run -it --rm -e POSTGRES_DB=ci -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=ci --publish 3456:5432 postgis/postgis:17-3.5-alpine
DATABASE_URL=postgis://postgres:ci@localhost:3456/ci bundle exec rspec spec/models/widgets_spec.rb This then leads to the dreaded error, because due to the So what I did to fix this was to basically manually load |
@colszowka sounds good, do you want to put that recipe to the the readme? 🙂 |
@DmitryTsepelev Sure, I sent a PR over here: #190 |
Hi there,
I believe the bugfix for #179 via #182 has introduced a regression for the original fix introduced in #156 - we are failing to upgrade to version 4, which is blocking us from upgrading forward to Rails 7.2, because (only on CI) our application fails to boot on an
accepts_nested_attributes_for
store model property, as it complains about a missing table.I am failing to reproduce this locally so far, but on CI our setup is like this:
DATABASE_URL
env var that points to that single instanceI can imagine this has to do with the "missing" test/development database, as we only provide a single database here, and I know rails has a bit of a history of trying to connect to development in test env regardless IIRC.
Not sure either what the fix for this is, considering rails/rails#52685, but as it stands we're blocked from upgrading here and it would be great if we could get the original problem fixed by #156 back in order somehow
The text was updated successfully, but these errors were encountered: