Permalink
Browse files

Load the environment after creating the database

  • Loading branch information...
1 parent e04818d commit 01059d7f7fcf2780c425895e4bdd5395edb6436b @jeremy jeremy committed Sep 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/railties/databases.rake
@@ -245,7 +245,7 @@ db_namespace = namespace :db do
end
end
- task :load_if_ruby => 'db:create' do
+ task :load_if_ruby => ['db:create', :environment] do
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby
end
@@ -328,7 +328,7 @@ db_namespace = namespace :db do
end
end
- task :load_if_sql => 'db:create' do
+ task :load_if_sql => ['db:create', :environment] do
db_namespace["structure:load"].invoke if ActiveRecord::Base.schema_format == :sql
end
end

0 comments on commit 01059d7

Please sign in to comment.