Seth Nickell

Results 219 comments of Seth Nickell

While running a migration I got these warnings: ``` Unable to annotate app/models/sections/clever_section.rb: wrong number of arguments (given 2, expected 1) [WARN] Section is calling acts_as_paranoid more than once! Unable...

From drone: ``` 'RAILS_ENV=test RACK_ENV=test bundle exec rake db:create db:test:prepare' returned 1 -- 40 | rake aborted! 41 | NoMethodError: undefined method `spec_name' for an instance of ActiveRecord::DatabaseConfigurations::HashConfig (NoMethodError) 42...

# Defining enums with keyword arguments is deprecated Lots of Rails 8 deprecation warnings running `rake db:create` like: ``` DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will...

# check_pending! is removed On `rake db:test:prepare`: ``` rake aborted! NoMethodError: undefined method `check_pending!' for an instance of ActiveRecord::Migration (NoMethodError) /Users/seth/src/code-dot-org/dashboard/lib/tasks/seed.rake:33:in `block (2 levels) in ' ``` `check_pending!` has been...

# LTI Zeitwerk errors Saw a bunch of errors running `rails test` at startup like: ``` 79 | [GEM]/zeitwerk-2.6.17/lib/zeitwerk/loader/callbacks.rb:32:in `on_file_autoloaded': expected file [CDO]/dashboard/lib/clients/cache_client.rb to define constant Clients::CacheClient, but didn't (Zeitwerk::NameError)...

``` /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activerecord-7.2.0/lib/active_record/attribute_methods/serialization.rb:183:in `serialize': wrong number of arguments (given 2, expected 1) (ArgumentError) from /Users/seth/src/code-dot-org/dashboard/app/models/sections/section.rb:96:in `' from /Users/seth/src/code-dot-org/dashboard/app/models/sections/section.rb:42:in `' ``` Fix is to explicitly pass `coder:` to serialize as a keyword...

# migrating off composite_primary_key to rails built-in ``` /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activerecord-7.2.0/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `primary_keys=' for class DatablockStorageTable (NoMethodError) from /Users/seth/src/code-dot-org/dashboard/app/models/datablock_storage_table.rb:32:in `' ``` Fixed by: [7a8d698](https://github.com/code-dot-org/code-dot-org/pull/60437/commits/7a8d6984b0f349dd5030b877ea50ab0a5eb27551)

``` /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/mocha-1.1.0/lib/mocha/integration/mini_test/adapter.rb:27:in `included': uninitialized constant MiniTest (NameError) Mocha::ExpectationErrorFactory.exception_class = ::MiniTest::Assertion ^^^^^^^^^^ Did you mean? Minitest from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/mocha-1.1.0/lib/mocha/integration/mini_test.rb:43:in `include' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/mocha-1.1.0/lib/mocha/integration/mini_test.rb:43:in `activate' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/mocha-1.1.0/lib/mocha/mini_test.rb:3:in `' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block...

``` bundled_gems.rb:74:in `require': cannot load such file -- i18n_controller (LoadError) from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.17/lib/zeitwerk/kernel.rb:34:in `require' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require' from /Users/seth/src/code-dot-org/dashboard/test/controllers/i18n_controller_test.rb:2:in `' ``` Another require that...

# Remove lock_thread.rb, a "feature backport from Rails 5.1" ``` code-dot-org/dashboard/test/testing/lock_thread.rb:25:in `with_connection': undefined method `[]' for nil (NoMethodError) unless (conn = @thread_cached_conns[owner_thread]) ^^^^^^^^^^^^^^ from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activerecord-7.2.0/lib/active_record/connection_handling.rb:296:in `with_connection' from /Users/seth/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activerecord-7.2.0/lib/active_record/relation/calculations.rb:317:in `block in...