Also I have xcode downloaded and everything else that is required :S
You have to install the command line tools separately these days (there's a 'downloads' section in Xcode where you can do that), but...
This is the guide i've been following:
That tutorial is 7 years old. The entire thing is pretty much out of date. Your mac already has a newer version of ruby installed, pretty much no-one uses lighttpd or fastcgi any more (at least not for development) etc.
Fred