I think this should be `Rake::Task[:gather_assets]`. My understanding from the docs is that `task` is just for creating a new task, rather than referring to an existing one. This works as is because it's defining `:gather_assets` again, which returns the existing instance of the defined task, and then calling invoke on it.