diff options
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 2c796f97e6..2a8cd83285 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -137,6 +137,7 @@ module ActiveRecord ActiveSupport.on_load(:active_record) do class ActiveRecord::NoDatabaseError + remove_possible_method :extend_message def extend_message(message) message << "Run `$ bin/rake db:create db:migrate` to create your database" message diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 06592eece2..acb7c65af5 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -78,7 +78,7 @@ module ActiveRecord each_current_configuration(environment) { |configuration| create configuration } - ActiveRecord::Base.establish_connection environment + ActiveRecord::Base.establish_connection(environment.to_sym) end def drop(*arguments) |