Rake tasks suffer from the same problem as running tests: the Rails bootup process takes a long time before the task is even running.
Is there a way to integrate spork and rake together?
Rake tasks suffer from the same problem as running tests: the Rails bootup process takes a long time before the task is even running.
Is there a way to integrate spork and rake together?
You can use the irake gem which makes it possible to execute rake tasks from the console.
Add this to Gemfile:
Then bundle and start console
...and wait for the Rails environment to load (only once). Then you can do:
If you want to list tasks, you can:
I discovered zeus today. It's the best thing ever, so I'm changing my answer to zeus:
https://github.com/burke/zeus
zeus rake my:special:task
There is no standard out of the box solution as i know.
Rake does not have --drb option and spork can't help here. Sure, custom solution is possible. This will require extension of rake runner.
I think rake tasks run not so often as tests, that why question is not addressed yet.