# lib/tasks/test.rake
task :hello do
puts 'hello'
end
$ rake app:hello
To run the task I need to prefix it with "app:" and it runs in the context of the dummy app. It is also exposed to the host application (i.e when used as a plugin in a parent Rails app) as rake hello
.
I want to run a rake task which does not require a Rails environment and runs some command, but it is run from the engine root, not the dummy app root.
task your_task: :environment do
– Chem