This project is archived and is in readonly mode.

#2197 ✓wontfix
Nick Hoffman

Crash during init if DB config doesn't exist

Reported by Nick Hoffman | March 10th, 2009 @ 04:54 PM | in 2.x

If a Rails application uses ActiveRecord but does not use a database, Rails will crash during initialization because the database config file does not exist.

If you're wondering why/how an application would use AR but not use a database, have a look at Jonathan Viney's ActiveRecord::BaseWithoutTable[1]. It's very useful.

I've attached a patch that causes Rails' initialization to check for the existence of the database config file before attempting to read the config and connect to the database.

[1] http://tinyurl.com/ddxkr9

Comments and changes to this ticket

  • Pratik

    Pratik June 21st, 2009 @ 10:12 PM

    • Assigned user set to “Joshua Peek”
    • State changed from “new” to “wontfix”

    This shouldn't be relevant anymore with AMo.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages