Exclude from array doesn't work as expected - ruby-on-rails

I'm trying to use ransack gem with acts_as_taggable. I have a simple Job model that configured acts_as_taggable in a default way and has tag_list property.
When I run:
Job.ransack("tags_name_in"=>["eum", "sint"]).result.to_sql
It generates SQL as expected (which is good):
"SELECT \"jobs\".* FROM \"jobs\" LEFT OUTER JOIN \"taggings\" ON \"taggings\".\"taggable_id\" = \"jobs\".\"id\" AND \"taggings\".\"context\" = 'tags' AND \"taggings\".\"taggable_type\" = 'Job' LEFT OUTER JOIN \"tags\" ON \"tags\".\"id\" = \"taggings\".\"tag_id\" WHERE \"tags\".\"name\" IN ('eum', 'sint')"
But when I'm trying to exclude by using:
Job.ransack("tags_name_not_in"=>["eum", "sint"]).result.to_sql
It throws exaptation:
NoMethodError: undefined method `left' for #<ActiveRecord::Relation::QueryAttribute:0x007f851ea6bcd8>
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/context.rb:190:in `block in build_correlated_subquery'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/context.rb:189:in `each'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/context.rb:189:in `build_correlated_subquery'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/nodes/condition.rb:9:in `block in arel_predicate'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/nodes/condition.rb:6:in `map'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/nodes/condition.rb:6:in `arel_predicate'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:17:in `visit_Ransack_Nodes_Condition'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:52:in `visit'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:5:in `accept'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/visitor.rb:4:in `block in visit_and'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/visitor.rb:4:in `map'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/ransack/visitor.rb:4:in `visit_and'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:24:in `visit_Ransack_Nodes_Grouping'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:52:in `visit'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/visitor.rb:5:in `accept'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/ransack-1.8.2/lib/ransack/adapters/active_record/context.rb:37:in `evaluate'
... 12 levels...
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/commands/rails.rb:6:in `call'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/command_wrapper.rb:38:in `call'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:191:in `block in serve'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:161:in `fork'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:161:in `serve'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/sashar/.rvm/gems/ruby-2.2.5/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/sashar/.rvm/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/sashar/.rvm/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Any ideas?

Related

NoMethodError: undefined method `each' for nil:NilClass on user creation rails

When I run my rails 5.1 app in development, everything is fine but when I run it on Heroku and try to create a user I keep getting this error.
NoMethodError: undefined method `each' for nil:NilClass
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/cluster.rb:192:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:454:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:454:in `create_from_addresses'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:253:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:64:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:64:in `create_client'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:27:in `create'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:69:in `block in with_name'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:68:in `synchronize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:68:in `with_name'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistence_context.rb:110:in `client'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistence_context.rb:70:in `collection'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/options.rb:73:in `collection'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual/mongo.rb:342:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:53:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:53:in `create_context'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:35:in `context'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:20:in `exists?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:276:in `validate_root'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:48:in `block in validate_each'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/queryable.rb:23:in `with_query'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:42:in `validate_each'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:150:in `block in validate'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:147:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:147:in `validate'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:413:in `block in make_lambda'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:178:in `block (2 levels) in halting_and_conditional'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:600:in `catch'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:600:in `block in default_terminator'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:179:in `block in halting_and_conditional'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `block in invoke_before'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `invoke_before'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:130:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/interceptable.rb:132:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:825:in `_run_validate_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:405:in `run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations/callbacks.rb:110:in `block in run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:131:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/interceptable.rb:132:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:825:in `_run_validation_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations/callbacks.rb:110:in `run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:335:in `valid?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable.rb:97:in `valid?'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:372:in `invalid?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/creatable.rb:117:in `prepare_insert'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/creatable.rb:23:in `insert'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/savable.rb:23:in `save'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/savable.rb:44:in `save!'
/app/db/seeds.rb:15:in `block in <top (required)>'
/app/db/seeds.rb:4:in `times'
/app/db/seeds.rb:4:in `<top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `block in load'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/railties/database.rake:20:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
I can't place what could be causing the error. It is running a DB on mongoid in mlab. Not sure if that is the cause. I can't seed the db in heroku console without getting the same error.
It looks like the Mongo driver is expecting to iterate across a number of host URIs, but has somehow managed to reach that point in the code without detecting that there aren't any defined.
As you're using Mongoid to interact with the (slight lower level) Mongo Ruby client, this file on configuration might give you some clues. You'll probably want to also refer to the documentation for whichever MongoDB add-on you have installed on Heroku.

finding model in rails gives "ArgumentError: no receiver given"

I just change the name of one of my models, it used to be "Course", and now it's "Booking", also I have created two brand new classes called "Course" and "Lesson" that both inherit from "Booking"
I have updated all the has_many in my models from :courses to :bookings, I made sure to rename the file to booking.rb, and renamed the table in the database to bookings.
When I run this in the rails console
Booking.find 1
I get this error
ArgumentError: no receiver given
The 2nd line below is the one causing the error
if filter.arity <= 0
lambda { |target, _| target.instance_exec(&filter) }
else
lambda { |target, _| target.instance_exec(target, &filter) }
end
Here is the stack trace
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:396:in `instance_exec'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:396:in `block in make_lambda'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:207:in `block in halting_and_conditional'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `block in call'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `each'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:456:in `call'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_initialize_callbacks'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/core.rb:350:in `init_with'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/persistence.rb:69:in `instantiate'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/querying.rb:50:in `block (2 levels) in find_by_sql'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/result.rb:52:in `block in each'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/result.rb:52:in `each'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/result.rb:52:in `each'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/querying.rb:50:in `map'
from ~/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/querying.rb:50:in `block in find_by_sql'
... 14 levels...
from ~/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from ~/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from ~/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from ~/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from ~/fidka_app/bin/rails:38:in `<top (required)>'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from ~/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from ~/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from ~/.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>'

Rails console only - Classes don't load (uninitialized constant)

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

Trouble installing Devise

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

Error on Rails Admin install. Possibly Devise related?

Sorry to copy in this entire log, but I'm hoping it might make more sense to someone familiar with this issue. When devise began setting up the user model I wasn't given the option (I never pressed enter) and the install proceeded and crashed, outputting the following. Thanks!
? What would you like the user model to be called? Press <enter> for [user] > - Now setting up devise with user model name 'user':
generate devise
invoke active_record
create db/migrate/20120825075751_add_devise_to_users.rb
insert app/models/user.rb
route devise_for :users
- Now you'll need an initializer...
create config/initializers/rails_admin.rb
/home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `block in source_reflection': undefined method `klass' for nil:NilClass (NoMethodError)
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `collect'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `source_reflection'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:375:in `rescue in foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:373:in `foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:259:in `association_foreign_key_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:71:in `block in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:29:in `block (2 levels) in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `block in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `tap'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:222:in `association_model_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:69:in `block (2 levels) in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `associated_model_config'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:19:in `block in <class:PolymorphicAssociation>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `instance_eval'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `block in register_instance_option'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:42:in `block in register_instance_option'
from (erb):86:in `block (2 levels) in template'
from (erb):85:in `map'
from (erb):85:in `block in template'
from (erb):82:in `map'
from (erb):82:in `template'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `result'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:111:in `block in template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `render'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `open'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:61:in `invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:26:in `create_file'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:110:in `template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/generators/rails_admin/install_generator.rb:59:in `install'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I figured it out. I installed devise first to debug and found it was an issue with my existing User model. I needed to drop the User table and start over.

Resources