require 'common' Dir.chdir(File.dirname(__FILE__)) do load 'Rakefile' #begin # require 'rake' # rescue LoadError # require 'rubygems' # require 'rake' # end #Rake.application.run # TODO: This doesn't load the Rails initializer always, thus can be using wrong db or whatever (at least for db:create) arg = ARGV.clone ARGV.clear arg.each do |entry| Rake.application[entry].invoke end end