title: rake aborted; SystemStackError, NoMethodError while running bundle exec rake db:migrate
body: <p>I am working on an existing project, which was made around 2014. While running <code>bundle exec rake db:migrate</code> I get the following error:</p>
  <pre><code>bundle exec rake db:migrate
  D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/object/duplicable.rb:82: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
  D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
  D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
  D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
  rake aborted!
  SystemStackError: stack level too deep
  rake aborted!
  NoMethodError: undefined method `reject' for nil:NilClass
  Traceback (most recent call last):
  D:/Ruby/Ruby26-x64/bin/rake: stack level too deep (SystemStackError)
  D:/Ruby/Ruby26-x64/bin/rake: undefined method `reject' for nil:NilClass (NoMethodError)
          9: from D:/Ruby/Ruby26-x64/bin/rake:23:in `&lt;main&gt;'
          8: from D:/Ruby/Ruby26-x64/bin/rake:23:in `load'
          7: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/exe/rake:27:in `&lt;top (required)&gt;'
          6: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
          5: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:185:in `standard_exception_handling'
          4: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:195:in `rescue in standard_exception_handling'
          3: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:208:in `display_error_message'
          2: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:218:in `display_exception_details'
          1: from D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:249:in `display_exception_backtrace'
  D:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/backtrace.rb:21:in `collapse': undefined method `reject' for nil:NilClass (NoMethodError)
  </code></pre>
  <p>My Ruby version is 2.6.6p146, and Rails 4.0.0 (as required by the gemfile)</p>
  <p>I've also read similar issues and tried <code>gem update --system</code>, but the same problem persists.</p>