Comments (5)
I see the error is happening when there is a DB connection problem. Looks like Authlogic is expecting the connection to be properly configured and if not the case it fails with this cryptical error. It would be better if Authlogic confirms the connection is stable or at least failing with another more explanatory error message.
from authlogic.
...I see the error is happening when there is a DB connection problem...
I saw this error and realized my server had no Postgres add-on provisioned at heroku.
jo-ytm-acpig $ heroku run rails c
› Warning: heroku update available from 7.68.2 to 8.0.1.
Running rails c on ⬢ app... up, run.4985 (Basic)
Loading production environment (Rails 7.0.4)
irb(main):001:0> User.count
/app/vendor/bundle/ruby/3.0.0/bundler/gems/rails-5bebef36ade9/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:87:in `rescue in new_client': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory (ActiveRecord::ConnectionNotEstablished)
Is the server running locally and accepting connections on that socket?
/app/vendor/bundle/ruby/3.0.0/gems/pg-1.4.4/lib/pg/connection.rb:754:in `connect_start': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory (PG::ConnectionBad)
Is the server running locally and accepting connections on that socket?
irb(main):002:0> exit
from authlogic.
Having the same problem here... not sure where to begin debuging.
Any news on that front?
from authlogic.
It definitely fails if there is no connection to the database or you are missing tables. You can verify it like @la-ruby did
from authlogic.
I ran into this error using 6.4.3 and can confirm that it was a database issue. Took a while to pinpoint the exact problem, but I had Puma server started up and running as an Ubuntu service. The DB credentials were in the environment variables initialized from the user profile, but because Puma was running as a service it could not see the environment variables. I fixed it by moving the DB credentials environment variables to a .env
file and loaded by the dotenv-rails
gem.
This was tricky to figure out because running Rails Console loaded the environment variables from the user profile and I couldn't tell that they were missing in the Puma server until I added special lines in the app to have them output to the Rails log. It was then I noticed the DB credentials were missing in Puma.
The error message led me down the wrong path because by looking at the source code I couldn't find figure out where Authlogic makes a DB call related to its retrieval of :password_field
as shown in the stack trace. So strange.
from authlogic.
Related Issues (20)
- Hashing ascii values vs bytes with SHA512 HOT 3
- Support for SameSite: "None" cookies HOT 1
- No changelog for 6.1.0 HOT 4
- Ruby 2.7 warnings HOT 2
- Inconsistent credentials cookie behaviour HOT 6
- Password#password_changed? returns true when transitioning crypto providers HOT 4
- Raise an error if database connection is not established before using acts_as_authentic
- Thread Safety HOT 1
- Ruby 2.7 warnings even in 6.1.0 (but not in master) HOT 2
- There isn't Git tag for v5.2.0. HOT 1
- Rubydoc for Authlogic is broken HOT 1
- When logging out from inside an iframe the `user_credentials` cookie doesn't get deleted in chromium based browsers. HOT 1
- Upgrade dependencies to accept Rails 7 HOT 10
- Eliminating a deprecation warning in Rails 7.0 HOT 3
- Wrong error message when valid email format of not existing user and fake password provided HOT 1
- NameError - wrong constant name Object.const_get(camel_cased_word) HOT 1
- Reference documentation (rubydoc) is broken HOT 1
- Authlogic is incompatible with Minitest v5.19.0 and later HOT 3
- Incompatible with Rails 7.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from authlogic.