Fix rails application root and remove extra dependencies