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.
Have found this gist a couple of times when this happened, but I couldn't find a running rails console. The way to kill the server was by running
spring stop