hggeorgiev/rails-jwt-auth-tutorial

load lib in production env

EstevanBR opened this issue · 0 comments

the guide says to put:
config.autoload_paths << Rails.root.join('lib')
in config/application.rb

this is sufficient in development environment, but the following needs to be added as well:
config.eager_load_paths << Rails.root.join('lib')
other wise files in lib are not loaded when booting the app in production

https://blog.bigbinary.com/2016/08/29/rails-5-disables-autoloading-after-booting-the-app-in-production.html