require "bundler/gem_tasks" # see: http://blog.aizatto.com/2007/05/27/activerecord-migrations-without-rails/ # require 'active_record' # require 'yaml' # ENV["RAILS_ENV"] ||= 'test' # task :default => :migrate # desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x" # task :migrate => :environment do # ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil ) # end # task :environment do # ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.yml'))[ENV["RAILS_ENV"]]) # ActiveRecord::Base.logger = Logger.new(File.open('tmp/database.log', 'a')) # end