Skip to content

Instantly share code, notes, and snippets.

@tripleee
Created October 20, 2021 20:20
Show Gist options
  • Save tripleee/6b2dcef28a3d15e00b45ede805bc7ddc to your computer and use it in GitHub Desktop.
Save tripleee/6b2dcef28a3d15e00b45ede805bc7ddc to your computer and use it in GitHub Desktop.
metasmoke rails db:seed failure
#20 18.45 + rails db:seed
#20 22.52 /usr/src/app/config/initializers/appconfig.rb:3: warning: already initialized constant AppConfig
#20 22.52 /usr/src/app/config/application.rb:50: warning: previous definition of AppConfig was here
#20 24.28 rails aborted!
#20 24.29 NoMethodError: undefined method `count' for nil:NilClass
#20 24.29 /usr/src/app/app/helpers/sites_helper.rb:9:in `update_sites'
#20 24.29 /usr/src/app/db/seeds.rb:16:in `<top (required)>'
#20 24.29 /usr/local/bundle/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `load'
#20 24.29 /usr/local/bundle/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `block in load'
#20 24.29 /usr/local/bundle/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
#20 24.29 /usr/local/bundle/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `load'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/engine.rb:554:in `block in load_seed'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/engine.rb:672:in `with_inline_jobs'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/engine.rb:554:in `load_seed'
#20 24.29 /usr/local/bundle/gems/activerecord-5.2.6/lib/active_record/tasks/database_tasks.rb:281:in `load_seed'
#20 24.29 /usr/local/bundle/gems/activerecord-5.2.6/lib/active_record/railties/databases.rake:194:in `block (2 levels) in <top (required)>'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb:20:in `perform'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/command.rb:48:in `invoke'
#20 24.29 /usr/local/bundle/gems/railties-5.2.6/lib/rails/commands.rb:18:in `<top (required)>'
#20 24.29 bin/rails:11:in `require'
#20 24.29 bin/rails:11:in `<main>'
#20 24.29 Tasks: TOP => db:seed
#20 24.29 (See full trace by running task with --trace)
#20 24.31 <table>
#20 24.31 <thead>
#20 24.31 <tr><td><strong>Path</strong></td><td><strong>Description</strong></td></tr>
#20 24.31 </thead>
#20 24.31 <tbody>
#20 24.31 </tbody>
#20 24.31 </table>
@tripleee
Copy link
Author

Hmm, I was able to log in and play around with it for a while but then it froze. Maybe I touched something I shouldn't have?

The last things I can see on the console are

205:M 20 Oct 2021 21:06:05.211 * 100 changes in 300 seconds. Saving...
205:M 20 Oct 2021 21:06:05.212 * Background saving started by pid 351
351:C 20 Oct 2021 21:06:05.218 * DB saved on disk
351:C 20 Oct 2021 21:06:05.219 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
205:M 20 Oct 2021 21:06:05.314 * Background saving terminated with success

@tripleee
Copy link
Author

It happened again, this time without anything interesting on the console. The site icon in the browser tab is replaced with a spinner, I can still click open menus but attempting to select something in them or otherwise clicking on anything doesn't navigate away from the page where I was when it happened. But it looks like there are probably just a few routes which trigger this. For example, just now, it clearly happened when I clicked http://localhost:5000/dev/request-log/user/1 and I think the earlier occurrences were also related to clicking on dev stuff related to logging or dumps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment