Created
July 25, 2008 23:50
-
-
Save adzap/2559 to your computer and use it in GitHub Desktop.
Restart task for passenger with debug option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... bottom of your development.rb | |
if File.exists?(File.join(RAILS_ROOT,'tmp', 'debug.txt')) | |
require 'ruby-debug' | |
Debugger.wait_connection = true | |
Debugger.start_remote | |
File.delete(File.join(RAILS_ROOT,'tmp', 'debug.txt')) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this rake file to your lib/tasks folder | |
task :restart do | |
system("touch tmp/restart.txt") | |
system("touch tmp/debug.txt") if ENV["DEBUG"] == 'true' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment