Added gem and fixed rails dependency