Skip to content

Instantly share code, notes, and snippets.

@esteedqueen
Last active September 7, 2023 04:36
Show Gist options
  • Select an option

  • Save esteedqueen/15749a7728f4835ad8dacf0f9d33de76 to your computer and use it in GitHub Desktop.

Select an option

Save esteedqueen/15749a7728f4835ad8dacf0f9d33de76 to your computer and use it in GitHub Desktop.
The curious case of frozen/hanging terminal when you run a`rails g migration` command

Ref: https://stackoverflow.com/questions/24622568/rails-generate-model-hangs

So, I ran into a mysterious situation where running a rails g migration ... command on my terminal freezes/hangs for a really long time.

Running ps aux | grep spring gave me a clue into what was going on.

I got the following:

esther            4201   0.0  0.0  2480224   2692   ??  S     6Sep17   0:00.82 spring server | panacea | started 191 hours ago
esther           41548   0.0  0.0  2432804    840 s002  S+   12:00PM   0:00.00 grep spring

It turned out I had a rails console server that had been running for 191hrs... Stopping that server resolved the issue.

@madipally
Copy link
Copy Markdown

Thanks for your suggestion, it was really helpful!

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