If you have rake tasks that don't rely on rails, it's really annoying that rails has to load before the tasks runs.
Instead this rakefile only loads rails if a rake task which depends on :environment
is called.
One caveat is that rake -T won't list rails/gem tasks, hence the added warning. To show all tasks use rake -T LOAD_RAILS=1
With thanks to @xshay http://rhnh.net/2010/09/07/speeding-up-rails-rake
Any thoughts?
Hmm, this still won't let you run tasks that you know are available, but that aren't in lib/tasks unless you add LOAD_RAILS=1
Which is particularly bad if your production environment expects them to be there :)