Why do I have this Internal Server Error in Blazer (Rails Business Intelligence gem)

171 Views Asked by At

(I almost posted this as an issue for Blazer but managed to figure out the problem. I'm posting it here in case someone else has the same issue.)

Bad Data Checks

For any and all bad_data checks that should "fail" (i.e. trigger the alert state and therefore the e-mail message) on my production server I get "Internal Server Error" as soon as I save them, where you would normally see "FAILING" or "PASSING":

image

Missing Data Checks

The same is true for missing_data checks that should "fail":

image

Everything else works perfectly.

1

There are 1 best solutions below

0
On BEST ANSWER

The problem was that my production server only had the default_url_options[:host] configured for routes and not for action_mailer. You need to have something like this in config/environments/<environment_name>.rb

  ...
  config.action_mailer.default_url_options = {host: "https://blah-blah-blah.whatever"}
  config.action_mailer.asset_host = "https://blah-blah-blah.whatever"
  ...

(The asset_host may not strictly be necessary. I didn't test without it.)