For one of my projects I am using rails 4.1 (bleeding edge! yeah :) ) and suddenly noticed, that after opening my laptop in the morning my normal rails commands, like
$> rails c
$> rails g migration Bla name description some_more_fields
just ... were hanging and nothing happened??? Like they were waiting for further input. Upon closer investigation, I assumed that the connection to the spring
process was lost/corrupt (I move between networks a lot? maybe that could explain it).
For those unaware, as I was, spring
is a Rails application preloader. It speeds up development by keeping your application running in the background so you don't need to boot it every time you run a test, rake task or migration. Of course when that connection is lost, or corrupt, it hangs.
A simple
$> spring stop
stops the spring
server, after which any rails
command will restart it automatically. Fixed :)
Comments
Yup, just happened to me, spring stop solved it. Love the invisible magic that breaks your system every now and then. Your post saved my day, at least the afternoon.
Worked. Thank you very much for this write-up.
Thanks!
You saved my day. Thank you Paolo
It works. Thanks
God I love you
Solved my issue! You're a genius! Thank you
I don't love you, but I am now very, very fond of you. Thanks for this post. Saved me some heartache.
You are my best friend right now.
Thank you, your answer and `spring stop` just saved me many hours of head scratching!!
Awesome, that made the trick!
Thank you!
Thanks bro! Worked for me as well.
Thanks a lot! You saved my day!
First google hit, ANSWER!! Thanks so much for taking the time to put this down.
Thank you very much!!! This just saved me so much time.
THANKS
For the record: It is March 2022 and I had this same problem with RSpec-configured Rails v6. Stopping Spring worked in that situation, also. I was happy to find this page.
Add comment