lib/grape_press/templates/Rakefile.erb in grape_press-0.0.1 vs lib/grape_press/templates/Rakefile.erb in grape_press-0.0.2
- old
+ new
@@ -21,10 +21,10 @@
namespace :db do
desc 'Create the database in the current GRAPE_ENV'
task :create do
config = YAML.load(File.read(File.join(APP_ROOT, 'config', 'database.yml')))[GRAPE_ENV.to_s]
- ActiveRecord::Base.establish_connection config.merge(database: nil)
+ ActiveRecord::Base.establish_connection config.merge(database: 'postgres')
ActiveRecord::Base.connection.create_database config['database']
ActiveRecord::Base.establish_connection config
end
desc 'Drops the database in the current GRAPE_ENV'