Files
osem/lib/tasks/cleardb.rake
Henne Vogelsang a3dd8e6c95 Use config/database.yml for ClearDB config
If we use .env heroku neither sees DATABASE_URL nor
config/database.yml and assumes we use postgre. There
also is no need to load the rails env in the task.
2016-05-25 16:49:56 +02:00

9 lines
259 B
Ruby

namespace :db do
desc 'setup DATABASE_URL from CLEARDB_DATABASE_URL in config/database.yml'
task 'cleardb_env' do
unless ENV['CLEARDB_DATABASE_URL'].nil?
FileUtils.copy_file('config/database.yml.heroku', 'config/database.yml')
end
end
end