Changeset 1271

Show
Ignore:
Timestamp:
01/10/08 13:57:09 (9 months ago)
Author:
in..@loobmedia.com
Message:

Merb.environment is currectly set before dependencies are loaded - ORM adapters tend to connect to the db when they're required

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app_generators/merb/templates/Rakefile

    r1268 r1271  
    1010 
    1111require File.dirname(__FILE__)+'/config/boot.rb' 
    12 #Merb.environment = ENV['MERB_ENV'] if ENV['MERB_ENV'] 
    1312require Merb::framework_root+'/tasks' 
     13include FileUtils 
     14 
     15# Set these before any dependencies load 
     16# otherwise the ORM may connect to the wrong env 
    1417Merb.root = File.dirname(__FILE__) 
    15 include FileUtils 
     18Merb.environment = ENV['MERB_ENV'] if ENV['MERB_ENV'] 
    1619 
    1720# Get Merb plugins and dependencies