Making this work with my rails project