Possible problem with EvmDatabase.seed_primordial


#1

I’m having a problem with a brand new database for development using EvmDatabase.seed_primordial, which I can’t understand. I’m currently on master with SHA 50fcc563

My workflow for getting up and running quickly is (and has been forever)

  • bin/rake evm:db:reset
  • bin/rails c
    • EvmDatabase.seed_primordial
  • bin/rails s

This has always put the database in a good enough state so you can login, add provider, etc. I intentionally use seed_primoridal because it’s faster than EvmDatabase.seed.

However, now when I do this I can’t login at all. In the UI I get “Error: Authentication failed”. In the log I see

Started POST "/dashboard/authenticate" for 127.0.0.1 at 2014-06-25 16:21:02 -0400
Processing by DashboardController#authenticate as JS
  Parameters: {"user_name"=>"admin", "user_password"=>"[FILTERED]", "browser_name"=>"Firefox", "browser_version"=>"30", "browser_os"=>"Mac", "user_TZO"=>"4"}
Completed 200 OK in 409.0ms (Views: 0.6ms | ActiveRecord: 9.2ms)

Note that I get this log when I hit the enter key after entering my password. If I manually click the Log In button, I get the following slightly different log message

Started POST "/dashboard/authenticate?button=login&method=post" for 127.0.0.1 at 2014-06-25 16:23:12 -0400
Processing by DashboardController#authenticate as JS
  Parameters: {"user_name"=>"admin", "user_password"=>"[FILTERED]", "browser_name"=>"Firefox", "browser_version"=>"30", "browser_os"=>"Mac", "user_TZO"=>"4", "button"=>"login", "method"=>"post"}
WARNING: Can't verify CSRF token authenticity
Completed 200 OK in 216.1ms (Views: 0.5ms | ActiveRecord: 6.6ms)

So, the only thing that seems to “unstick” me is to do EvmDatabase.seed, and then things work. This leads me to think that something changed and one of the things in the larger seed needs to also be in seed_primordial.

I’d make a GitHub issue for this, but I don’t really understand the problem.

/cc @martin_povolny @kbrock @dclarizio