Added Rails example, fixed minor parsing bug in kruskal