Run Rake tasks¶
You can perform various maintenance tasks with the help of the rake utility (find more information at http://docs.seattlerb.org/rake/). Examples of Rake tasks may be creation of a database structure or population of a database with test data.
This functionality is available if the application contains a Rakefile that describes available Rake tasks (for details, refer to the Rakefile format documentation). It is a good practice to have the ‘rake’ gem listed in a Gemfile.
Go to Websites & Domains and click Ruby. After gems
installation you can try to run a Rake task by clicking Run rake
task. In the opened dialog, you can provide some parameters and click
OK - this will be equivalent to running the
rake utility with
the specified parameters in the command line.
For example, to view the list of available tasks, enter
-T and click
OK (this is equivalent to running the command
To run a specific task (for example,
about), use the the task name
as a parameter (this is equivalent to running the command
More examples of Rake commands:
- To run a default task, run the rake utility without any parameters:
- To run a task with environment variables, specify the values of the
variables in the form
[variable=value]before the task name:
rake RAILS_ENV=production SECRET_KEY_BASE=my-secret-key about.
- To run a task with parameters, specify the value of parameters in
- To view the list of all available
rakeoptions, use the