fixes #7627 - handle cases where this code is ran outside of rails

When running katello ruby code outside of rails the Rails.root
is incorrectly set (katello-disconnected)