how to get god status in rails

337 views Asked by At

I have setup god and provided script file to load and it working as expected. i wanted to take status of that god process from my rails application.

I am not able to take god status from my rails controller.

my code

require 'god'
class HomesController < ApplicationController
  def status_check
    God::status
  end
end

but this gives me error uninitialized constant HomesController::God

Please help me to call god status from my web application.

1

There are 1 answers

0
Aleksei Matiushkin On

require 'god' does not do much without $load_god globally set to true.

If you for some reason want to load God in production Rails, set $load_god = true before require 'god'.

Please notice, that the productivity penalty might be drastic.