Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8255635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:35:32+00:00 2026-06-08T01:35:32+00:00

I just recently update my Rails application to use Authlogic. The authentication works fine

  • 0

I just recently update my Rails application to use Authlogic. The authentication works fine in development mode, but the test is no longer working. Each time I launch rspec using bundle exec rake spec, the application throws the following error message (trimmed):

/home/user/.rvm/gems/ruby-1.9.3-p194/gems/authlogic-3.1.3/lib/authlogic/acts_as_authentic/base.rb:31:in `acts_as_authentic': You must establish a database connection before using acts_as_authentic (StandardError)
    from /home/user/Documents/projects/rails_demo/app/models/user.rb:6:in `<class:User>'
    from /home/user/Documents/projects/rails_demo/app/models/user.rb:2:in `<top (required)>'
    from /home/user/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'

I know it has something to do with database connection not being established, but I don’t know what do I have to do to fix it. It works in development.

By the way, this is my database configuration:

test:
  adapter: sqlite3
  database: ":memory:"

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

Can anyone provide me with a guidance on what I have to do to fix the problem?
Any help would be appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:35:35+00:00Added an answer on June 8, 2026 at 1:35 am

    Sorry, answering my own question. I should have discovered this earlier.
    Changing the database config for test environment to this fix the problem:

    test:
      adapter: sqlite3
      database: db/test.sqlite3
      pool: 5
      timeout: 5000
    

    Still, I don’t know why Authlogic doesn’t work with in memory sqlite3 database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use svn update to deploy, but have recently explored Capistrano. I see they
I don´t know what I did, but just recently the hole view is displaced
I'm pretty new to J2ME development scene. And for that matter, have just recently
I have been using jquery ui with no problem but just recently the jquery
Hi I just recently downloaded the most recent snow leopard update. Then I tried
We have a legacy VB6 application which has worked just fine on Windows XP
I started a Rails project recently and decided to use RESTful controllers. I created
I've recently started creating a WPF application, and am just hoping that someone can
I just recently started programming in Ruby on Rails, and I was wondering if
I've just recently started learning/using Ruby at work. I've got a super-simple test script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.