make sync task depend on rails environment