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:
parent
f77fa3ca4a
commit
2b9144d50c
@ -6,7 +6,7 @@ require 'rails/all'
|
|||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
Bundler.require(*Rails.groups)
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
require_relative '../app/lib/exceptions'
|
require_relative '../lib/exceptions'
|
||||||
require_relative '../lib/paperclip/lazy_thumbnail'
|
require_relative '../lib/paperclip/lazy_thumbnail'
|
||||||
require_relative '../lib/paperclip/gif_transcoder'
|
require_relative '../lib/paperclip/gif_transcoder'
|
||||||
require_relative '../lib/paperclip/video_transcoder'
|
require_relative '../lib/paperclip/video_transcoder'
|
||||||
|
Loading…
Reference in New Issue
Block a user