Cl(Spec A) = 0 implies A is a UFD This is bothering me and I'd appreciate any clarification. If I know that $ \text{Cl(Spec $A$)}= 0$, why doesn't that imply that $A$ is a UFD? Why do I need that $A$ is integrally closed? This comes from 14.2.T in Ravi's notes. Thanks.  
 A: Suppose $A$ is a noetherian domain.
As Alex indicates, you can't even define the class group of $S=\operatorname {Spec}(A)$ without some regularitry assumption.
Usually the assumption is  that $S$  be regular in codimension $1$, which is implied by  $A$ being integrally closed (=normal).
You might then think of replacing the class group by the Picard group, which is defined for any scheme.
However  the  condition $\operatorname {Pic}(A)=0$, although necessary,  is not sufficient  to ensure factoriality:
The  (integrally closed!) ring $A=\mathbb C[X,Y,Z]/(XY-Z^2)$ satisfies $\operatorname {Pic}\bigl(\operatorname { Spec}(A)\bigr)=0$ but is not factorial.  
To end on a positive note here is however a criterion in this vein for $A$ to be factorial:
A noetherian domain is factorial if and only if every prime ideal of height one is principal. 
Edit: Chow groups
Although a general  algebraic  scheme $S$ of dimension $n$ does not have a class group, there is a close substitute : the Chow group $CH_{n-1}(S)$.
It coincides with the class group $\operatorname  {Cl}(S)$ if $S$ is normal and comes with a canonical morphism of abelian groups $\operatorname {Pic}(S)\to CH_{n-1}(S)$, which is  injective (resp. bijective) if $S$ is normal (resp. locally factorial).
