Skip to content

Instantly share code, notes, and snippets.

@morimori
Created April 23, 2010 13:38
Show Gist options
  • Save morimori/376543 to your computer and use it in GitHub Desktop.
Save morimori/376543 to your computer and use it in GitHub Desktop.
RAILS_ENV からログを判別して tail -f するタスク
namespace :log do
desc "tail -f log/#{RAILS_ENV || 'development'}.log"
task :tail do
sh "tail -f log/#{RAILS_ENV || 'development'}.log" rescue RuntimeError
puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment