Beta functions of a scalar theory coupled to gravity