uninitialized constant ActiveRecord (NameError)
$ rails g impressionist --orm mongoid Traceback (most recent call last): 48: from bin/rails:4:in `<main>' 47: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 46: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 45: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 44: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 43: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 42: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands.rb:18:in `<main>' 41: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command.rb:46:in `invoke' 40: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/base.rb:69:in `perform' 39: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 38: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 37: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 36: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands/generate/generate_command.rb:21:in `perform' 35: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:15:in `require_application_and_environment!' 34: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:28:in `require_environment!' 33: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:339:in `require_environment!' 32: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 31: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 30: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 29: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 28: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 27: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 26: from /Users/rhee/project/live-channel-admin/config/environment.rb:5:in `<main>' 25: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:363:in `initialize!' 24: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:60:in `run_initializers' 23: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each' 22: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each' 21: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component' 20: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call' 19: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each' 18: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component' 17: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from' 16: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 15: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each' 14: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers' 13: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `run' 12: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `instance_exec' 11: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/engine.rb:7:in `block in <class:Engine>' 10: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/engine.rb:25:in `include_orm' 9: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 8: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 7: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 6: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 5: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 4: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 3: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/models/active_record/impression.rb:5:in `<main>' 2: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in `load_missing_constant' 1: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in `allow_bootsnap_retry' /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in `block in load_missing_constant': uninitialized constant ActiveRecord (NameError) 49: from bin/rails:4:in `<main>' 48: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 47: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 46: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 45: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 44: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 43: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands.rb:18:in `<main>' 42: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command.rb:46:in `invoke' 41: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/base.rb:69:in `perform' 40: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 39: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 38: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 37: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands/generate/generate_command.rb:21:in `perform' 36: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:15:in `require_application_and_environment!' 35: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:28:in `require_environment!' 34: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:339:in `require_environment!' 33: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 32: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 31: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 30: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 29: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 28: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 27: from /Users/rhee/project/live-channel-admin/config/environment.rb:5:in `<main>' 26: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:363:in `initialize!' 25: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:60:in `run_initializers' 24: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each' 23: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each' 22: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component' 21: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call' 20: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each' 19: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component' 18: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from' 17: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 16: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each' 15: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers' 14: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `run' 13: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `instance_exec' 12: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/engine.rb:7:in `block in <class:Engine>' 11: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/engine.rb:25:in `include_orm' 10: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' 9: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 8: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 7: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 6: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 5: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 4: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/impressionist-2.0.0/lib/impressionist/models/active_record/impression.rb:5:in `<main>' 3: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:59:in `load_missing_constant' 2: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in `rescue in load_missing_constant' 1: from /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:9:in `without_bootsnap_cache' /Users/rhee/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in `block in load_missing_constant': uninitialized constant ActiveRecord (NameError)
Solution
https://github.com/charlotte-ruby/impressionist
https://github.com/charlotte-ruby/impressionist/issues/206
$ vim config/initializers/impression.rb Impressionist.orm = :mongoid
$ rails g impressionist --orm mongoid warning ../package.json: No license field invoke mongoid conflict config/initializers/impression.rb Overwrite /Users/rhee/project/live-channel-admin/config/initializers/impression.rb? (enter "h" for help) [Ynaqdhm] Y force config/initializers/impression.rb