This has happened to me on numerous occasions and I hope I can find an answer here.
Sometimes when working with the Rails console and performing an #update or #destroy action on an object, my console will simply freeze after posting "BEGIN" in the log. I currently have one open, a simple destroy, that has been sat there for ten minutes.
i.e.:
my_object.find(permitted_params[:thing][:id]).destroy
CTRL+C on my mac does not kill it and simply renders:
^C^C^C^C^C^C^C^C^C^C
Then when I finally kill the tab and restart the server I get:
A server is already running. Check /path/to/app/tmp/pids/server.pid.
Then when I clear server.pid
and try to restart the server I get:
/Users/nickschwaderer/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/socket.rb:206:in `bind': Address already in use - bind(2) for 127.0.0.1:3000 (Errno::EADDRINUSE)
At that point I run lsof -wni tcp:3000
, then kill -9 #whatever_my_pid_was
, to finally set everything straight to re run the server.
What in the sam blue heck is happening here?