When starting my rails application on Ubuntu (through any process e.g. console, server, rake tasks, etc) I get an uninitialised constant error from my gems. However, I can clone the exact same repo on to OSX and it works. The error I show is coming from apartment, but if I remove the references to Core::Organisation, the issue just propagates to the next loaded gem. So I figure it's something to do with the gems being loaded before the constants from the application.
I've tried eager loading using
config.eager_load = true
config.enable_dependency_loading = true
but it didn't change anything.
UPDATE:
I've found replacing "Core::Organisation" with just "Organisation" makes it work. So it's something to do with the namespacing. In the base directory there is a module core.rb:
module Core
def self.table_name_prefix
'core_'
end
end
Environment:
Ubuntu 18.04
Ruby 2.5.0
Rails 5.2.2
Example error trace:
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `block in load_missing_constant': uninitialized constant Core::Organisation (NameError)
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `rescue in load_missing_constant'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:56:in `load_missing_constant'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:285:in `const_get'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:285:in `block in constantize'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:281:in `each'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:281:in `inject'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:281:in `constantize'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/adapters/postgresql_adapter.rb:50:in `process_excluded_model'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/adapters/abstract_adapter.rb:105:in `block in process_excluded_models'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/adapters/abstract_adapter.rb:104:in `each'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/adapters/abstract_adapter.rb:104:in `process_excluded_models'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/tenant.rb:18:in `init'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/railtie.rb:34:in `block (2 levels) in <class:Railtie>'
from /var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
from /var/lib/gems/2.5.0/gems/apartment-2.2.0/lib/apartment/railtie.rb:33:in `block in <class:Railtie>'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `instance_exec'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
from /var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/reloader.rb:89:in `prepare!'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
from /usr/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
from /usr/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each'
from /usr/lib/ruby/2.5.0/tsort.rb:347:in `call'
from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
from /usr/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
from /var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
from /home/sellsmartadmin/Sellsmart/config/environment.rb:5:in `<main>'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from /var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:102:in `preload'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Thanks in advance for any help anyone has to offer!
I've found the answer!
Turns out Linux is just a bit more fussy about directories than OSX. My namespaced modules were in a directory called "Core/". When I changed this to "core" (all lowercase), everything worked as expected.
Related
I am trying to start redmine and I got this error
NameError: uninitialized constant Mime::CSV
/usr/share/redmine/config/initializers/20-mime_types.rb:4:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:666:in `block in load_config_initializer'
/var/lib/gems/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:665:in `load_config_initializer'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `block in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `tsort_each_child'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:339:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:523:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/var/lib/gems/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
Version of rails: Rails 6.0.3.2. I have tried to add require 'mime' to the 20-mime_types.rb file, but it doesn't work.
You didn't mention the Redmine version you've used, but even latest Redmine for now (4.1.7) expects Rails 5.1
So please take into account official requirements
I am having the weirdest error. SOMETIMES (usually after a code push), I will SSH into our production RoR servers and load up a console. When that happens, I get a crazy NameError error, then I try again and the console loads, but I cant use any of my classes
ubuntu#ip-10-0-1-10 /v/w/numanage> rails c -e production
/home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:268:in `const_get': uninitialized constant AdminUser
Did you mean? Admin (NameError)
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:268:in `block in constantize'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `inject'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `constantize'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:583:in `get'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:614:in `constantize'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise.rb:301:in `get'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/mapping.rb:81:in `to'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/mapping.rb:76:in `modules'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/mapping.rb:93:in `routes'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/mapping.rb:160:in `default_used_route'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/mapping.rb:70:in `initialize'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise.rb:331:in `new'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise.rb:331:in `add_mapping'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/rails/routes.rb:240:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/devise-4.2.0/lib/devise/rails/routes.rb:240:in `devise_for'
from /var/www/numanage/config/routes.rb:12:in `block in <top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /var/www/numanage/config/routes.rb:1:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/file_update_checker.rb:77:in `execute'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:7:in `execute'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:132:in `block (2 levels) in <module:Finisher>'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:396:in `instance_exec'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:396:in `block in make_lambda'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:169:in `block (2 levels) in halting'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:547:in `block (2 levels) in default_terminator'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:546:in `catch'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:546:in `block in default_terminator'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:170:in `block in halting'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:454:in `block in call'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:454:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:454:in `call'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_run_callbacks'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/execution_wrapper.rb:99:in `run!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/reloader.rb:113:in `run!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/reloader.rb:48:in `block (2 levels) in reload!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/reloader.rb:46:in `tap'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/reloader.rb:46:in `block in reload!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/execution_wrapper.rb:76:in `wrap'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/reloader.rb:45:in `reload!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:154:in `serve'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
ubuntu#ip-10-0-1-10 /v/w/numanage> rails c -e production
Running via Spring preloader in process 4926
Loading production environment (Rails 5.0.0.1)
2.3.1 :001 > User
NameError: uninitialized constant User
from (irb):2
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /var/www/numanage/bin/rails:9:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/commands/rails.rb:6:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/commands/rails.rb:6:in `call'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/command_wrapper.rb:38:in `call'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:191:in `block in serve'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:161:in `fork'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:161:in `serve'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.3.1#numanage/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
2.3.1 :003 >
The really crazy part is, the puma server starts up just fine and acts like nothings wrong
I'm really at a lost to even debug this, let me know if y'all have any ideas
EDIT:
We are using the devise and ActiveAdmin gems, so the routes.rb:12 is as follows
devise_for :admin_users, ActiveAdmin::Devise.config
It looks like devise is loading out AdminUser (ActiveRecord model), which is failing for some unknown reason
Rails: 4.2.5
I'm using STI and needed to get all Subclasses.
But as in dev environment, rails does Lazy Loading. So Model.subclasses and Model.descendants always return []
Googling sent me to this issue: https://github.com/rails/rails/issues/3364
And the above issue suggested following solution to put as initializer:
ActionDispatch::Reloader.to_prepare do
Rails.application.eager_load!
end
And on that I'm getting following exception:
/Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activemodel-4.2.5/lib/active_model/validations/validates.rb:120:in `rescue in block in validates': Unknown validator: 'PersenceValidator' (ArgumentError)
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activemodel-4.2.5/lib/active_model/validations/validates.rb:117:in `block in validates'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activemodel-4.2.5/lib/active_model/validations/validates.rb:113:in `each'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activemodel-4.2.5/lib/active_model/validations/validates.rb:113:in `validates'
from /Users/vmac1/rails_projects/survd/app/models/sub_service.rb:7:in `<class:SubService>'
from /Users/vmac1/rails_projects/survd/app/models/sub_service.rb:1:in `<top (required)>'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `load'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/vmac1/rails_projects/survd/app/models/buffet_service.rb:1:in `<top (required)>'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `load'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /Users/vmac1/rails_projects/survd/config/initializers/eagerload_subclasses.rb:2:in `block in <top (required)>'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:446:in `instance_exec'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:446:in `block in make_lambda'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:192:in `call'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:192:in `block in simple'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `call'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `block in call'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `each'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `call'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_prepare_callbacks'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /Users/vmac1/rails_projects/survd/config/environment.rb:5:in `<top (required)>'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application.rb:92:in `preload'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application.rb:143:in `serve'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application.rb:131:in `block in run'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application.rb:125:in `loop'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application.rb:125:in `run'
from /Users/vmac1/.rvm/gems/ruby-2.2.3/gems/spring-1.6.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/vmac1/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
As others have said, the actual error is a validation typo. But in regards to the original problem, Rails 4.2 eager-loads all classes in production by default, so you'd just have to change the eager_load and cache_classes setting in your other environments to get the same behavior. However, this will make development much more unpleasant since you'll have to restart the server every time you make a code change.
What is the underlying problem you're trying to solve by listing all subclasses? There might be another design that would avoid that requirement.
Typo of persence instead of presence
I am using rails for a quick project. I try to run rake:db migrate after rails g devise User on the command line and I get this error log:
Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `ensure in with_devise_exclusive_scope': undefined method `merge!' for #<ActionDispatch::Routing::Mapper::Scope:0x007fcbe5e766f8> (NoMethodError)
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `with_devise_exclusive_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:248:in `block (2 levels) in devise_for'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:351:in `block in devise_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:940:in `block in constraints'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:816:in `scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:940:in `constraints'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:350:in `devise_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:247:in `block in devise_for'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/ashleighalmeida/Rails-Blog/config/routes.rb:3:in `block in <top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:410:in `draw'
from /Users/ashleighalmeida/Rails-Blog/config/routes.rb:1:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/finisher.rb:81:in `block (2 levels) in <module:Finisher>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:446:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:446:in `block in make_lambda'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:192:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:192:in `block in simple'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `block in call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_prepare_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:153:in `serve'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
I configured it in enviornment.rb, added my alerts, what could be the problem?
There is a bug in this version of Devise with Rails. You can update to a newer version.
This should help you to solve the problem.
That's because you hadn't properly installed Devise when you generated the User model.
To resolve this problem, run this command
rails g devise:install
I tried installing devise but ran into a lot of migration issues so went ahead and uninstalled the gem. I tried running rake:db migrate, redo, reset, and drop and I still get this error even without Devise:
/Users/ashleighalmeida/mixi/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant Devise (NameError)
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/ashleighalmeida/mixi/config/environment.rb:5:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:92:in `preload'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
How do I completely remove Devise from my migration? Thanks!
Seems like you forgot to remove Devise initializer, which lies here:
config/initializers/devise.rb