Is your Mac failing to boot past the grey screen, thanks to deleting some important system files? The example below is specific, but the general method to resolve should be the same in many cases: boot into single user mode and re-install the missing program.
Having switched to a Mac after years of being solely a Windows user (and you
think you had a tough time growing up?!), every day is very much a learning
curve. Today was no different, while trying to get libxml2 working nicely with
the Nokogiri rubygem, I installed a newer version of the toolkit to a different
location. My Mac stubbornly insisted on using the current 2.6.16 version so I
bravely strolled into terminal and ran: sudo rm /usr/lib/libxml*.