Open up your favorite editor and copy paste the code below. Save it as testruby.cgi on your server. Change the permissions for that file to chmod 755 testruby.cgi.
cgi = CGI.new("html3")
If all goes well you should see hello world. I tested it here. Once you've tested it out you know that your account supports ruby.
Now moving on to python. Copy paste the code below to a file testpython.py and change the permissions for that file to chmod 755 testpython.py.
field = cgi.FieldStorage()
print "Content-Type: text/plain\n\n"
print 'Hello, world!\n'
If all goes well you should see hello world. Here is my python hello world script.
This is just one reason why I really like dreamhost. You can tinker with things I even tried to install mono but got bored mid way. There were a little too many steps plus in any case I have a windows hosting for that ;)
Incase you are looking for a web hosting and you are impressed by dreamhost use the promo code VJ97 to save $97 on any of their web hosting plan.
UPDATE: Come to think of it this post sounds like a cheap infomercial, but I really cannot help it.