Heroku: Fix "SignalException: SIGHUP" errors
#!/usr/bin/env ruby | |
APP_PATH = File.expand_path("../../config/application", __FILE__) | |
require_relative "../config/boot" | |
# Make a clean exit on Heroku while running a rails console. | |
# Without this we'll get a "SignalException: SIGHUP" error in honeybadger. | |
if ENV["DYNO"] | |
if ["c", "console"].include?(ARGV.first) | |
Signal.trap("SIGHUP") { exit 0 } | |
end | |
end | |
require "rails/commands" |
This comment has been minimized.
This comment has been minimized.
@taylorbrooks i think this goes into bin/rails |
This comment has been minimized.
This comment has been minimized.
@tskogberg thank you for this script, I just used it and worked like a charm! |
This comment has been minimized.
This comment has been minimized.
this works only with heroku? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
@tskogberg Where did you put this code? In an initializer?