title: Cannot raise custom exception in Rails 5.2
body: <p>I am developing a RoR application. I need to use a custom exception I implemented. It looks like this:
  </p>
  
  <pre><code># app/exceptions/JobError.rb
  module Exceptions
     class JobError &lt; StandardError
        # ... 
     end
  end
  </code></pre>
  
  <p>However, I got a <code>uninitialized constant JobError</code> when I raise the exception. I tried different namespaces but none of them work:
  </p>
  
  <pre><code>raise JobError.new()
  raise Exceptions::JobError.new()
  raise ::Exceptions::JobError.new()
  </code></pre>
  
  <p>Any idea?</p>