-
Notifications
You must be signed in to change notification settings - Fork 550
ActiveRecord::AdapterNotSpecified bug in latest update (6.0.5) #2281
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
Comments
Same here. I am building a docker image with the phusion/passenger-ruby26 and setting my environment variables for production stage. Had to update some scripts and rebuilt my image and i'm getting
I looked a lot to the updated code in search for some error in it. But is pretty much like the old code I had. Found this issue and it's verry similar to the problem I have. Full backtrace:
|
I didn't see this come up in my testing, can someone provide a Dockerfile that repproduces the issue please? |
I can't speak for other people. My company uses MongoDB along with Rails. If you follow the official way to support MongoDB in Rails, |
This is happening in a Sinatra web app as well. |
Also happening to our sinatra app. Had to roll back to 6.0.4 |
So it looks like the issue might be that |
We already removed references to ActiveRecord following Mongo's
recommendations.
…On Mon, Jun 15, 2020 at 11:09 AM Camden Narzt ***@***.***> wrote:
So it looks like the issue might be that ActiveRecord::Base is present
but not configured. The instructions at
https://docs.mongodb.com/mongoid/current/tutorials/getting-started-rails/#activerecord-configuration
indicate to remove ActiveRecord completely. Can someone who has this
issue check if ActiveRecord is present in your Gemfile.lock and if
removing it helps?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2281 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABEU34W7XXONB4BI5J4MPKLRWZPUXANCNFSM4NQJHE4A>
.
|
We are using |
@dlundgren and @mikero you are using ActiveRecord but ActiveRecord throws |
this is happening on our apps as well, with active record disabled |
@3mammoth my mongo test app works fine in passenger 6.0.5: https://github.com/CamJN/mongotest |
I have a legacy application on Sinatra that uses a custom DB connection with |
Here's how we're configuring ActiveRecord in our Cuba apps. I've also found the same issue with some Sinatra apps we're running as well, and we configure ActiveRecord in the same manner.
|
Ok, I think I'll just rescue in the case where the |
I think the issue is 3790eec#diff-696bdc7bb15daaa28a5f17914682f671 calls I use the following config code to my Sinatra project as workaround:
|
phusion/passenger#2281 this bug is affecting canvas builds, so we are pinning passenger to 6.0.4 until it has been resolved.
Yes, @ihower is correct. And the next version of Passenger should handle this case. Thanks to everyone who helped debug this issue. |
i'm not really sure that calling what's the advantage of passenger doing this? |
Passenger has to close all database connections after forking so that the pool works properly, so we reestablish the connection so that the first request after a process is started up doesn't take an extra long time. See here: https://www.phusionpassenger.com/docs/advanced_guides/in_depth/ruby/spawn_methods.html |
I performed an "apt update" on one of our Ubuntu 18.04 staging servers, and the update included Passenger version 6.0.5. Immediately after installing this update, our application started throwing the following error:
Error: The application encountered the following error: 'staging' database is not configured. Available: [] (ActiveRecord::AdapterNotSpecified)
I was able to track down the cause of the error to the following Passenger commit:
3790eec#diff-696bdc7bb15daaa28a5f17914682f671
Manually reverting this commit to loader_shared_helpers.rb and restarting Nginx fixed the problem for us.
We are running a Ruby Cuba app, using ActiveRecord 5.2, with open source Passenger/Nginx, on Ubuntu 18.04.4 LTS. Ruby 2.5.1p57. Not sure if this affects Rails apps.
Happy to provide more info if needed.
Thanks
The text was updated successfully, but these errors were encountered: