Memory Limit Hit following rubyrailstutorial.org
Hi,
I am following the tutorial on Ruby Rails Tutorial and I am using the Cloud9 IDE however I keep getting a "Memory Limit Hit" when running through the tutorial. I am using the free tier which comes with 512MB Ram which is constantly in the red zone.
I have tried killing some processes, but as soon as I start back on the tutorial I keep getting the error.
Thanks
Michael
Short answer: Spring has a bug that causes it to use up memory by spawning too many processes.
From your c9 shell, run
pkill -9 -f spring
and restart your rails server.
Longer answer: He describes a lot about it in Chapter 3 of the tutorial. Box 3.4 on this page https://www.railstutorial.org/book/static_pages covers it nicely.
Incidentally, I found that I couldn't simply restart my c9 session...it's really good at persisting the state of your virtual server ... including all of the extra Spring processes.