Permalink
Browse files

Merge pull request #1184 from gnufied/master

Fixes connection_not established error while running db:schema:dump
  • Loading branch information...
2 parents dd8ab4f + e9a2ff8 commit 78172987cfa8428531541202806819d0be786182 @tenderlove tenderlove committed May 23, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/railties/databases.rake
View
1 activerecord/lib/active_record/railties/databases.rake
@@ -338,6 +338,7 @@ db_namespace = namespace :db do
task :dump => :load_config do
require 'active_record/schema_dumper'
File.open(ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb", "w") do |file|
+ ActiveRecord::Base.establish_connection(Rails.env)
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
end
db_namespace['schema:dump'].reenable

0 comments on commit 7817298

Please sign in to comment.