Do you mean running the entire system off of ram, or just certain directories? Sometimes I mount certain directories into tmpfs if I want the speed. (for example, I mount /tmp and /var/tmp if I'm doing an emerge that doesn't require a lot of space)
You could use all sorts of scripts to do things like move the current contents of the directory into the ramdrive. But without that, the easiest way to do a ramdrive (for Gentoo users) is something like:
mount tmpfs /var/tmp/portage -t tmpfs -o size=256m
for a 256 meg tmpfs drive. And just umount it like any other mount when you're done.
The reason I say Gentoo users is because gentoo already requires a tmpfs drive to boot (/dev/shm), so you don't have to bother making one.
The one problem with tmpfs is that it's swappable, which you might not want. In that case, you'd probably have to use ramfs instead. But unless I'm mistaken, tmpfs shares its space with the rest of the ram, preventing a program from existing twice in memory, while ramfs doesn't. But I'm not really sure about that since I don't use ramfs.