Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Migrations fail if ActiveRecord::Base.logger is nil

#3434

When running ActiveRecord without the entire Rails stack, ActiveRecord::Base.logger isn't automatically set. So when migrations are run this line fails

   Base.logger.info "Migrating to #{migration.name} (#{migration.version})"

Placing an if Base.logger at the end seems to be the simplest switch.

Reported by ProbablyCorey · October 27th, 2009 @ 11:21 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: High

Activity

  1. ProbablyCorey
  2. ProbablyCorey
  3. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • State changed from new to verified
    • Assigned user changed from Repository to Prem Sichanugrist (sikachu)

    +1 On this bug

    This patch applies cleanly on master, but not on 2-3-stable. I've updated the patch for 2-3-stable

    Also, I've included the test case that raise this issue.

    January 26th, 2010 @ 09:35 AM

  4. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • Assigned user changed from Prem Sichanugrist (sikachu) to José Valim

    January 30th, 2010 @ 02:09 PM

  5. Repository
  6. José Valim
    José Valim
    • State changed from verified to resolved

    February 2nd, 2010 @ 10:40 AM