method
rake
v3.0.0 -
Show latest stable
- Class:
Rails::Generators::Actions
rake(command, options={})public
Runs the supplied rake task
Example
rake("db:migrate") rake("db:migrate", :env => "production") rake("gems:install", :sudo => true)
1Note
Doesn't output into STDOUT
Oddly enough it runs a rake task without any sort of output. To get around it you can simple substitute it with:
puts run('rake your_task')
Unless somebody has a better idea?