-
-
Save xenda/238796 to your computer and use it in GitHub Desktop.
Restart Task and Debug with ruby-debug
This file contains 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 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