method
rake
v7.1.3.2 -
Show latest stable
-
1 note -
Class: Rails::Generators::Actions
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0 (0)
- 3.0.9 (-2)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (-2)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (3)
- 5.1.7 (0)
- 5.2.3 (4)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (38)
- 7.1.3.4 (0)
- What's this?
rake(command, options = {})
public
Runs the specified Rake task.
rake "db:migrate" rake "db:migrate", env: "production" rake "db:migrate", abort_on_failure: true rake "stats", capture: true rake "gems:install", sudo: true
Options
- :env
-
The Rails environment in which to run the task. Defaults to ENV["RAILS_ENV"] || "development".
- :abort_on_failure
-
Whether to halt the generator if the task exits with a non-success exit status.
- :capture
-
Whether to capture and return the output of the task.
- :sudo
-
Whether to run the task using sudo.
Register or
log in
to add new notes.
Oleg -
July 15, 2010
0 thanks
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?