Rails 4 uninitialized constant for module

This will also work in Rails 5 in your application.rb file:

    config.autoload_paths << Rails.root.join('lib')
    config.autoload_paths << Rails.root.join('lib/notifier')

Have you added lib to your autoload path? This was necessary in Rails 3, I'm not sure if it's still required for Rails 4.

Try adding this into the class definition in config/application.rb -

    config.autoload_paths += %W(#{config.root}/lib)

I had this problem too with the lib directory with Rails 5 and it appeared in production but not in development. To fix it you need to add the lib directory to eager_load_paths. Here is the relevant part from my application.rb:

config.autoload_paths << "#{Rails.root}/lib"
config.eager_load_paths << "#{Rails.root}/lib"

Try adding this line to the top of your controller:

require "#{Rails.root}/lib/process_bill.rb"