Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
rake db:seed failing on pending migration when there are none

I'm running a (previously working fine) seed file like so: Seed failure trace

I check to see if there are pending migrations with rake db:migrate:status and all migrations are "up".

For additional context, here's what led me to this point:

  1. Working in 6 year old Rails Code
  2. Start a branch for feature "A"
  3. Wrap feature "A". Checkout new branch for Feature "B" Master --> "A" --> "B"
  4. Finish feature "B" + commit
  5. Checkout "A" for refactoring
  6. Add column to migration for "A" (nothings been merged with master yet, so I figure I can drop and rebuild my dev db no problem WRONG)
  7. Wrap refactoring for "A" + Commit
  8. Checkout Branch "B" 9 Merge "A" into "B"
  9. Drop DB
  10. Create DB with bin/rake db:create db:schema:load All good
  11. Run rake db:seed and nothing happens.
  12. Run with trace and get the error you see above.
  13. Have no idea what's causing this.

More Context

-Ruby 2.3.1 -Rails 4.2.7.1 -Postgresql 9.6.2

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

It doesn't look like you actually have a problem; abort_if_pending_migrations just happens to be the last trace line that even a successful seed outputs. A fully-working Rails env on my machine spits out the same output, but works just fine (complete with 0 error code):

$ be rake db:seed --trace
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
$ echo $?
0

For the record, it's expected for db:seed to normally print no output.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda