Skip to content

Instantly share code, notes, and snippets.

@rsanheim
Created October 10, 2011 20:06
Show Gist options
  • Select an option

  • Save rsanheim/1276373 to your computer and use it in GitHub Desktop.

Select an option

Save rsanheim/1276373 to your computer and use it in GitHub Desktop.
Turn on trace in Rake tasks at runtime
# when you can't use --trace for whatever reason...
desc "Turn on trace during the rake call chain"
task :turn_on_trace do
Rake.application.options.trace = true
end
# then in your dependency chain put that task first
task :foo => [:turn_on_trace, :one, :two, :etc]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment