method

rake

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

Oleg · Jul 14, 2010

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?