module Rails::Generators::Actions
def rake(command, options={})
rake("gems:install", :sudo => true)
rake("db:migrate", :env => "production")
rake("db:migrate")
==== Example
Runs the supplied rake task
def rake(command, options={}) log :rake, command env = options[:env] || 'development' sudo = options[:sudo] && RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ ? 'sudo ' : '' in_root { run("#{sudo}#{extify(:rake)} #{command} RAILS_ENV=#{env}", :verbose => false) } end