method
rake
v7.0.0 -
Show latest stable
- Class:
Rails::Generators::Actions
rake(command, options = {})public
Runs the supplied rake task (invoked with ‘rake …’)
rake("db:migrate") rake("db:migrate", env: "production") rake("gems:install", sudo: true) rake("gems:install", capture: 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?