fix js example, add ruby example