From: MaD Date: 2009-01-14T17:39:18+09:00 Subject: Re: rake: passing args to Task invoke well for db:migrate modifying ENV works very well, but if you want to pass a certain RAILS_ENV it seems to be impossible from inside an active rails-app. you'll have to go with system calls. system('rake db:drop RAILS_ENV=test') but ENV['VERSION']= '0' Rake::Task['db:migrate'].invoke so far even on tha rake mailing-list no other option occurred.