Made the index file work independently of rails.