require 'rake'
Rails.application.load_tasks # <-- MISSING LINE
Rake::Task['my_task'].invoke
$ rails g task my_namespace my_task1 my_task2
$ create lib/tasks/my_namespace.rake
$ bin/rake task_name
bin/rake -P
# or
bin/rake --tasks
rails raketaskname:task
Code Example |
---|
Ruby :: rails faker url |
Ruby :: ruby class |
Ruby :: iterate over array ruby |
Ruby :: rails validates_presence_of |
Ruby :: ruby for loop |
Ruby :: rails g migration remove default |
Ruby :: rails parse boolean |
Ruby :: %w meaning in ruby |
Ruby :: what is ruby language used for |
Ruby :: rails devise valid_password |
Ruby :: require multiple files ruby |
Ruby :: ruby number of week |
Ruby :: format date rails created long |
Ruby :: ruby join hash to string |
Ruby :: ruby and or |
Ruby :: rails g controller with actions |
Ruby :: rails api |
Ruby :: ||= ruby |
Ruby :: Validate French phone numbers |
Ruby :: rails interrupt if tooo long |
Ruby :: comments in ruby grepper |
Ruby :: Ruby exclude from slice |
Ruby :: grep routes rails |
Ruby :: ruby timeout |
Ruby :: time_ago_in_words for created_at model in rails |
R :: check type of column in r |
R :: read csv file in r |
R :: set row names in r |
R :: r dataframe append row |
R :: how to convert negative values to positive in R |