The affine scheme of a general ring