Autoload lib in rails 5

Add this to your application.rb

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

http://stackoverflow.com/questions/17007685/rails-4-uninitialized-constant-for-module

http://collectiveidea.com/blog/archives/2016/07/22/solutions-to-potential-upgrade-problems-in-rails-5/

Post Content