Fix "NameError: uninitialized constant Exceptions"

Zeitwerk operates on files in the autoload paths. Since the
entire "app" directory is autoloaded, all files inside need to
play by Zeitwerk's rules. Zeitwerk expects that a file named
"exceptions.rb" would define a constant named "Exceptions".

The exceptions file doesn't follow Zeitwerk's conventions.
The easiest way to solve this is to move the execptions out of
app/lib and into lib, where `require_relative` doesn't have
Zeitwerk taken into account.
This commit is contained in:
rubic0n 2021-01-31 17:06:45 -06:00
parent f77fa3ca4a
commit 2b9144d50c
2 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ require 'rails/all'
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
require_relative '../app/lib/exceptions'
require_relative '../lib/exceptions'
require_relative '../lib/paperclip/lazy_thumbnail'
require_relative '../lib/paperclip/gif_transcoder'
require_relative '../lib/paperclip/video_transcoder'