fixed referrals join. set environments for gemfiles.