-
-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Description
Chapter 4 autoload
Listing 5. lib/json_web_token.rb
# ...
module MarketPlaceApi
class Application < Rails::Application
# ...
config.autoload_paths << Rails.root.join('lib')
end
end
I notice you're using autoload. I find the area confusing. My understanding is autoloading lib was not threadsafe which is a problem with Puma in production and the suggestion was you should stick lib into app :-| I couldn't bring myself to do that and went with the other suggestion of changing autoload to eager load, which autoloads in development and eager loads, no requests until code loaded, in production.
tenzan
Metadata
Metadata
Assignees
Labels
No labels