added ruby and fixed a few php bugs