GithubHelp home page GithubHelp logo

Comments (5)

fguillen avatar fguillen commented on September 22, 2024 3

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.

la-ruby avatar la-ruby commented on September 22, 2024

...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.

sandrods avatar sandrods commented on September 22, 2024

Having the same problem here... not sure where to begin debuging.
Any news on that front?

from authlogic.

quevon24 avatar quevon24 commented on September 22, 2024

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.

wakproductions avatar wakproductions commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.