use ensure_resource to make sure the needed dependencies are installed