[root#centos-512mb-nyc3-01 dc]# rake db:migrate
rake aborted!
NameError: uninitialized constant RDF::DC
/usr/local/rvm/gems/ruby-2.3.1/gems/rdf-2.2.3/lib/rdf.rb:65:in `const_missing'
/root/dc/app/models/concerns/work_metadata.rb:10:in `block in <module:WorkMetadata>'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:120:in `class_eval'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:120:in `append_features'
/root/dc/app/models/generic_work.rb:5:in `include'
/root/dc/app/models/generic_work.rb:5:in `<class:GenericWork>'
/root/dc/app/models/generic_work.rb:1:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `const_get'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `block in constantize'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `each'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `inject'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `constantize'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
/usr/local/rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.3/app/models/curation_concerns/classify_concern.rb:41:in `to_class'
/usr/local/rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.3/app/models/curation_concerns/classify_concern.rb:14:in `block in all_curation_concern_classes'
/usr/local/rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.3/app/models/curation_concerns/classify_concern.rb:14:in `map'
/usr/local/rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.3/app/models/curation_concerns/classify_concern.rb:14:in `all_curation_concern_classes'
/usr/local/rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.3/app/models/concerns/curation_concerns/nested_works.rb:7:in `block in <module:NestedWorks>'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:120:in `class_eval'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:120:in `append_features'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:117:in `include'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:117:in `block in append_features'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:117:in `each'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/concern.rb:117:in `append_features'
/usr/local/rvm/gems/ruby-2.3.1/gems/sufia-7.0.0/app/models/batch_upload_item.rb:5:in `include'
/usr/local/rvm/gems/ruby-2.3.1/gems/sufia-7.0.0/app/models/batch_upload_item.rb:5:in `<class:BatchUploadItem>'
/usr/local/rvm/gems/ruby-2.3.1/gems/sufia-7.0.0/app/models/batch_upload_item.rb:4:in `<top (required)>'
/root/dc/config/initializers/overrides.rb:5:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:446:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:446:in `block in make_lambda'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:192:in `block in simple'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `block in call'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `each'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `call'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_prepare_callbacks'
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/local/rvm/gems/ruby-2.3.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
/usr/local/rvm/gems/ruby-2.3.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/root/dc/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
The version of rdf you are using doesnt have
RDF::DC
you need to use
RDF::Vocab::DC
or use version below 2.0
https://github.com/ruby-rdf/rdf/issues/293
Related
I have used Devise a million times, but I have never had this issue. I have placed the gem in my gem file. I did 'bundle install' then I typed ' rails generate devise:install' and I get this error:
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `const_get': uninitialized constant User (NameError)
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `inject'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:305:in `get'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:81:in `to'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:76:in `modules'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:93:in `routes'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:70:in `initialize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `new'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `add_mapping'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `devise_for'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `block in <top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:1:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:352:in `initialize!'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/environment.rb:5:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:92:in `preload'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I previously had gotten past this step, but I was turning around and trying it again. I had already run 'rails generate devise User,' but had received an error. If I run that same command again, I get this:
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `const_get': uninitialized constant User (NameError)
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `inject'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:305:in `get'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:81:in `to'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:76:in `modules'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:93:in `routes'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:70:in `initialize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `new'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `add_mapping'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `devise_for'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `block in <top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:1:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:352:in `initialize!'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/environment.rb:5:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:92:in `preload'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Can someone help? I can't seem to get past this basic setup stage.
Your error shows you added devise_for :user in routes.rb when you haven't set it up yet, as shown here:
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `<top (required)>'
Remove devise_for :user from routes.rb, run the install generator, then add devise_for :user again if it worked out.
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 followed the steps on https://github.com/plataformatec/devise to install devise.
after bundle install
I tried to add initializer to my app config using:
rails generate devise:install
However, I keep getting this error:
undefined method `devise' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
Stack trace:
/Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activerecord-4.0.10/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `devise' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
from /Users/MyUsername/Documents/AppDev/Pinteresting/app/models/user.rb:4:in `<class:User>'
from /Users/MyUsername/Documents/AppDev/Pinteresting/app/models/user.rb:1:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:424:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:424:in `block in load_file'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:616:in `new_constants_in'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:423:in `load_file'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:324:in `require_or_load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:463:in `load_missing_constant'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:226:in `const_get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `inject'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:535:in `get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:566:in `constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:302:in `get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:80:in `to'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:75:in `modules'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:92:in `routes'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:69:in `initialize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:336:in `new'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:336:in `add_mapping'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:223:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:315:in `draw'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `block in load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:30:in `run'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application.rb:215:in `initialize!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application.rb:189:in `require_environment!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Okay, I figured out the problem. I guess because I previous installed devise and tried to reinstall a new version. However, devise automatically created some models for the app. I deleted those created folders/files and rerun rails generate devise:install and it worked.
When I try to run my rails server I get the following error (Important note: I have just pulled my code from Github to Nitrous.Io, and was starting to work on the application):
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `const_get': uninitialized constant User (NameEr
ror) from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:285:in `get'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:77:in `to'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:72:in `modules'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:89:in `routes'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:156:in `default_used_route'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:66:in `initialize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:319:in `new'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:319:in `add_mapping'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:210:in `block in devise_for'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:209:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:209:in `devise_for'
from /home/action/pinteresting/config/routes.rb:4:in `block in <top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /home/action/pinteresting/config/routes.rb:1:in `<top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/action/pinteresting/config/environment.rb:5:in `<top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Looks like your database hasn't yet been created.
The most likely solution would be to run rake db:migrate if you're using sqlite, though if you're using Postgres or Mysql on Nitrous, you'll need to install them first. There is a guide to what's available here http://help.nitrous.io/categories/databases/