4GB is enough to run a rails environment, but ideally you want more ram. Most developers end up with lots of browser tabs and other programs open. In chrome every tab you open is a little more ram that the browser will eat.
OSX mavericks really seems to be a pig on memory from what I can tell. I usually run around 3-4 gb of my memory with out even trying too hard. If I really load up a ton of stuff I can spike it to around 5-6gb especially running photoshop or RubyMine / PHPstorm. RubyMine can eat 1.5gb of ram easy on a large rails project.
It’s one of the reasons I am looking to switch to Vim. Your easiest fix it to go grab a few sticks of ram that are larger. I believe the macbook pro has 2 slots for ram still, so you have 2 x 2gb sticks. I would upgrade those to 2 x 4gb at the least or 2 x 8gb and 1600mhz. Either way upping your ram is a good idea.
Thanks Jared. You are right, even with not much stuff going on, its almost full. Mine is 13" retina macbook pro and RAM is not upgradable unfortunately. Also I use sublime and that does not seem to be eating much memory. Thanks though, its helpful.
I use a MacBook Air with 4GB and it’s fine, although admittedly the SSD helps.
Due to way that virtual memory works, you will often find that the physical memory usage is at, or near to, 100%, but this by itself is not necessarily a problem. The OS will try keep as many recently accessed files in memory as it can, and swap out less-often used files to disk, to later re-load back into the RAM when needed.
If your machine feels sluggish, use the Activity Monitor to see if some processes are hogging the CPU.
Having said that, if your machine allows user-installed memory upgrades, then a few extra gig doesn’t cost much these days.