Devise Rails 4 Error - ruby-on-rails

New Rails app. Very simple
Followed https://github.com/plataformatec/devise
now getting:
NameError: uninitialized constant User
root#youplus:/var/www/html/YouPlus# rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
NameError: uninitialized constant User
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/inflector/methods.rb:238:in `const_get'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/inflector/methods.rb:238:in `block in constantize'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/inflector/methods.rb:236:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/inflector/methods.rb:236:in `inject'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/inflector/methods.rb:236:in `constantize'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise.rb:301:in `get'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/mapping.rb:80:in `to'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/mapping.rb:75:in `modules'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/mapping.rb:92:in `routes'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/mapping.rb:159:in `default_used_route'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/mapping.rb:69:in `initialize'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise.rb:335:in `new'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise.rb:335:in `add_mapping'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:224:in `block in devise_for'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `devise_for'
/var/www/html/YouPlus/config/routes.rb:5:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
/usr/local/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
/usr/local/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:315:in `draw'
/var/www/html/YouPlus/config/routes.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:40:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:16:in `reload!'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/file_update_checker.rb:75:in `call'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/file_update_checker.rb:75:in `execute'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:27:in `updater'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `run'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/usr/local/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each'
/usr/local/lib/ruby/2.1.0/tsort.rb:345:in `call'
/usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/local/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/usr/local/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application.rb:300:in `initialize!'
/var/www/html/YouPlus/config/environment.rb:5:in `<top (required)>'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application.rb:276:in `require_environment!'
/usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/application.rb:379:in `block in run_tasks_blocks'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:199:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/usr/local/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate => environment
How do I fix this?
Tried
why do I get uninitialized constant Devise name Error when running webrick server?
https://github.com/plataformatec/devise/issues/1605

Related

skipping initializer in development enviroment rails

When ever, I perform a rails test in cmd line, or rails db:migrate RAILS_ENV=test I keep getting a NoMethodError for my omniauth initialzer although the rails server works fine and so does, omniauth on my, heroku site where my code is pushed to. I read this question Rails: Per-environment initializers? and added if Rails.env.production? at the top of my omniauth initialzer file so to run the omniauth initialzer only for production but I am having no luck.
The full error is;
db:migrate RAILS_ENV=test --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rails aborted!
NoMethodError: undefined method `[]' for nil:NilClass
C:/Sites/Peoples_Profiles/config/initializers/omniauth.rb:5:in `block in <top (required)>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/omniauth-1.3.1/lib/omniauth/builder.rb:6:in `initialize'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:35:in `new'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:35:in `build'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:100:in `block in build'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:100:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:100:in `inject'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/stack.rb:100:in `build'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:508:in `block in app'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:504:in `synchronize'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:504:in `app'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `call'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
C:/Sites/Peoples_Profiles/config/environment.rb:5:in `<top (required)>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:248:in `call'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:248:in `block in execute'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:243:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:243:in `execute'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:209:in `block in invoke_prerequisites'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:207:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:207:in `invoke_prerequisites'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:186:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task.rb:173:in `invoke'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:152:in `invoke_task'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate => environment
Anyone got any ideas as to why this is?
added if Rails.env.production? at the top of my omniauth initialzer file
Just adding it at the top will do nothing. Wrap your logic in the conditional
if Rails.env.production?
# your omniauth stuff
end

Error already initialized constant Activerecord::base::OrmAdapter

I am trying to run the derailed gem in my Rails application on Heroku because I am getting a r14 memory issue.
I have a hobby account using Puma as my server running only the 1 dyno.
The problem I am having is when I try to run any of the derailed gems derailed perf exec: methods. I get this issue
Booting: production
/Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: already initialized constant ActiveRecord::Base::OrmAdapter
/Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: previous definition of OrmAdapter was here
/Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: already initialized constant ActiveRecord::Base::OrmAdapter
/Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: previous definition of OrmAdapter was here
/Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:171:in `spec': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.5.2/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/yihuazhang/Projects/learnabli/formula/config/initializers/devise.rb:24:in `block in <top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.5.2/lib/devise.rb:278:in `setup'
from /Users/yihuazhang/Projects/learnabli/formula/config/initializers/devise.rb:3:in `<top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/derailed_benchmarks-1.3.0/lib/derailed_benchmarks/tasks.rb:26:in `block (2 levels) in <top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `call'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/derailed_benchmarks-1.3.0/lib/derailed_benchmarks/tasks.rb:60:in `block (2 levels) in <top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `call'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:201:in `block in invoke_prerequisites'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:199:in `each'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:199:in `invoke_prerequisites'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:178:in `block in invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/derailed_benchmarks-1.3.0/bin/derailed:41:in `exec'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/yihuazhang/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/derailed_benchmarks-1.3.0/bin/derailed:92:in `<top (required)>'
from /Users/yihuazhang/.rbenv/versions/2.2.2/bin/derailed:23:in `load'
from /Users/yihuazhang/.rbenv/versions/2.2.2/bin/derailed:23:in `<main>'
But I don't really know what to make of the issue.
Run rake rails:updatein your rails root and restart your server.
Raised when adapter not specified on connection (or configuration file config/database.yml misses adapter field).

Multi-Tenant Engine & Devise - Invoke environment (first_time) NameError: uninitialized constant User

Engine & devise all configured.
https://github.com/CoastDigitalGroup/cdg-subengine
Example Starter App I'm trying to build and configure engine which fails with uninitialized constant error: https://github.com/CoastDigitalGroup/cdg-substarter
** Invoke routes (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
NameError: uninitialized constant User
/home/nitrous/code/cdg-substarter/.bundle/bundler/gems/cdg-subengine-2af76555ad4c/app/models/subengine/user.rb:26:in `<module:Subengine>'
/home/nitrous/code/cdg-substarter/.bundle/bundler/gems/cdg-subengine-2af76555ad4c/app/models/subengine/user.rb:25:in `<top (required)>'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/inflector/methods.rb:263:in `const_get'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/inflector/methods.rb:263:in `block in constantize'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/inflector/methods.rb:259:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/inflector/methods.rb:259:in `inject'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/inflector/methods.rb:259:in `constantize'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise.rb:290:in `get'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/mapping.rb:81:in `to'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/mapping.rb:76:in `modules'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/mapping.rb:93:in `routes'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/mapping.rb:160:in `default_used_route'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/mapping.rb:70:in `initialize'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise.rb:324:in `new'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise.rb:324:in `add_mapping'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/rails/routes.rb:224:in `block in devise_for'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/rails/routes.rb:223:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/devise-3.5.1/lib/devise/rails/routes.rb:223:in `devise_for'
/home/nitrous/code/cdg-substarter/.bundle/bundler/gems/cdg-subengine-2af76555ad4c/config/routes.rb:17:in `block in <top (required)>'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/mapper.rb:601:in `instance_exec'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/mapper.rb:601:in `block in with_default_scope'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/mapper.rb:816:in `scope'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/mapper.rb:600:in `with_default_scope'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
/home/nitrous/code/cdg-substarter/.bundle/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:412:in `draw'
/home/nitrous/code/cdg-substarter/.bundle/bundler/gems/cdg-subengine-2af76555ad4c/config/routes.rb:3:in `<top (required)>'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:40:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/file_update_checker.rb:75:in `call'
/home/nitrous/code/cdg-substarter/.bundle/gems/activesupport-4.2.3/lib/active_support/file_update_checker.rb:75:in `execute'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
/home/nitrous/code/cdg-substarter/config/environment.rb:5:in `<top (required)>'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application.rb:328:in `require_environment!'
/home/nitrous/code/cdg-substarter/.bundle/gems/railties-4.2.3/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/nitrous/code/cdg-substarter/.bundle/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
.bundle/binstubs/rake:16:in `load'
.bundle/binstubs/rake:16:in `<main>'
Tasks: TOP => routes => environment
I added in user.rb file to models and add
include Subengine::UserStorage
I think you didn't refer Devise documentation
http://www.rubydoc.info/gems/devise/file/README.md
please refer in above link.

heroku run db:migrate fail as rake aborted

after pushing my latest code Heroku doesn't alter the tables.
when i run "heroku rake db:migrate" i get rake aborted!
its says syntax error but i cant figure where is the error
syntax error on line 4, col 586: ` state: ["σלקµ╡╖Θבף","Θ¥עµú«τ£ל","σ▓⌐µיכτ£ל","σ««σƒמτ£ל","τºכτפ░τ£ל","σ▒▒σ╜óτ£ל","τªןσ│╢τ£ל","Φל¿σƒמτ£ל","µáדµ£¿τ£ל","τ╛ñΘª¼τ£ל","σƒ╝τמיτ£ל","σםדΦסיτ£ל","µ¥▒Σ║¼Θד╜","τÑ₧σÑטσ╖¥τ£ל","µצ░µ╜ƒτ£ל","σ»לσ▒▒τ£ל","τƒ│σ╖¥τ£ל","τªןΣ║ץτ£ל","σ▒▒µó¿τ£ל","Θץ╖Θחמτ£ל","σ▓נΘר£τ£ל","Θ¥שσ▓íτ£ל","µה¢τƒÑτ£ל","Σ╕יΘחםτ£ל","µ╗כΦ│אτ£ל","Σ║¼Θד╜σ║£","σñºΘר¬σ║£","σו╡σ║½τ£ל","σÑטΦי»τ£ל","σעלµ¡לσ▒▒τ£ל","Θ│Ñσןצτ£ל","σ│╢µá╣τ£ל","σ▓íσ▒▒τ£ל","σ║דσ│╢τ£ל","σ▒▒σןúτ£ל","σ╛│σ│╢τ£ל","Θªשσ╖¥τ£ל","µה¢σ¬¢τ£ל","Θ½רτƒÑτ£ל","τªןσ▓íτ£ל","Σ╜נΦ│אτ£ל","Θץ╖σ┤מτ£ל","τזךµ£¼τ£ל","σñºσטזτ£ל","σ««σ┤מτ£ל","Θ╣┐σונσ│╢τ£ל","µ▓צτ╕הτ£ל"]'
/usr/local/lib/ruby/1.9.1/syck.rb:135:in `load'
/usr/local/lib/ruby/1.9.1/syck.rb:135:in `load'
/usr/local/lib/ruby/1.9.1/syck.rb:146:in `block in load_file'
/usr/local/lib/ruby/1.9.1/syck.rb:145:in `open'
/usr/local/lib/ruby/1.9.1/syck.rb:145:in `load_file'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:172:in `load_yml'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:157:in `load_file'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `block in load_translations'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `load_translations'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:57:in `init_translations'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:71:in `lookup'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:26:in `translate'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:44:in `block (2 levels) in translate'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:43:in `catch'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:43:in `block in translate'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:42:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:42:in `translate'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n.rb:156:in `block in translate'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n.rb:152:in `catch'
/app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n.rb:152:in `translate'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/railtie.rb:102:in `block in <class:Railtie>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:34:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:193:in `block (2 levels) in initialize_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `<main>'
Tasks: TOP => db:version => environment
any ideas what is the problem?
I just ran into the exact same situation
/usr/local/lib/ruby/1.9.1/syck.rb:135:in `load': syntax error on line 4, col 586:
syntax error on line 4, col 586: ` state: ["北海道","青森県","岩手県","宮城県","秋田県","山形県","福島県","茨城県","栃木県","群馬県","埼玉県","千葉県","東京都","神奈川県","新潟県","富山県","石川県","福井県","山梨県","長野県","岐阜県","静岡県","愛知県","三重県","滋賀県","京都府","大阪府","兵庫県","奈良県","和歌山県","鳥取県","島根県","岡山県","広島県","山口県","徳島県","香川県","愛媛県","高知県","福岡県","佐賀県","長崎県","熊本県","大分県","宮崎県","鹿児島県","沖縄県"]'
some of my local /tmp/asset binaries matched the grep statement. I ran "heroku run grep -R "state:" *" and found that the file "vendor/bundle/ruby/1.9.1/gems/faker-1.1.0/lib/locales/ja.yml" matched my problem line. Works fine on my end, but apparently the Faker gem has a problem on Heroku's.

rake db:migrate YAML parser error

I use ruby 1.9.2 and rake 0.9.2.2 on Ubuntu.
When I want to
rake db:migrate
I get the following error message
rake aborted!
couldn't parse YAML at line 89 column 16
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:148:in `parse'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:119:in `parse'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:106:in `load'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:205:in `load_file'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:171:in `load_yml'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:157:in `load_file'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `block in load_translations'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `load_translations'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:57:in `init_translations'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:71:in `lookup'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:26:in `translate'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:156:in `block in translate'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:152:in `catch'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:152:in `translate'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activerecord-3.1.3/lib/active_record/railtie.rb:102:in `block in <class:Railtie>'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/ralv/devapp/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:193:in `block (2 levels) in initialize_tasks'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate => environment
I can solve the problem by commenting out the 89th line of my locale file:
open_tasks: %{total} (%{count} offen)
But it's quite annoying to do this everytime I want to migrate the database...
The problem seems to be the blank character in front of the first percent sign. If I change the line to
open_tasks: (%{total} (%{count} offen)
I can migrate without an abortion.
How can I avoid this parser error?
Thanks
Christian
You can use quotes for complex values
open_tasks: "%{total} (%{count} offen)"

Resources