Is it true that a variety is smooth if all of its local rings are regular local rings? I know that a scheme $ X $ is regular of codimension one for example, if every one-dimensional local ring $ \mathcal{O}_{x} $ of $ X $ is regular. 
 A: This is not true. The following is probably one of the original examples of this phenomenon, due to Chevalley.
Example [Zariski, Ex. 3]. Let $k$ be an imperfect field of characteristic $p > 2$, and let $a \in k \smallsetminus k^p$. For example, one can set $k = \mathbf{F}_p(t)$ and $a = t$. Let $S = k[x,y]$ and $f = y^2 + x^p - a \in S$, and consider the ring
$$R = S/(f) = \frac{k[x,y]}{y^2 + x^p - a}.$$
We first note that the Jacobian of $R$ over $k$ is $(0,\ 2y)$.
Since this matrix has full rank every point except at the maximal ideal $\mathfrak{m}_R := (y,x^p-a)R$, the ring $R$ is smooth (in particular, regular) every point not equal to $\mathfrak{m}_R$.
We now claim that $R$ is regular but not smooth at $\mathfrak{m}_R$. To show that $R$ is regular at $\mathfrak{m}_R$, we first set $\mathfrak{m}_S := (y,x^p-a)S$. We have
$$\dim_k\biggl(\frac{\mathfrak{m}_S}{\mathfrak{m}_S^2}\biggr) = 2$$
since $S$ is regular. Moreover, since $f \not\equiv 0 \bmod \mathfrak{m}_S^2$, we see that
$$\dim_k\biggl(\frac{\mathfrak{m}_R}{\mathfrak{m}_R^2}\biggr) = \dim_k\biggl(\frac{\mathfrak{m}_S}{\mathfrak{m}_S^2+(f)}\biggr) = 1,$$
and $R$ is regular at $\mathfrak{m}_R$.
To show that $R$ is not smooth at $\mathfrak{m}_R$, we note that
$$R’ := R \otimes_k k(a^{1/p}) \simeq \frac{k(a^{1/p})[x,y]}{y^2 + x^p - a} \simeq \frac{k(a^{1/p})[x,y]}{y^2 + (x - a^{1/p})^p},$$
which we claim is not regular at $\mathfrak{m}_{R’} := (y, x - a^{1/p})R’$. We have that $f \in \mathfrak{m}_S^2$, hence
$$\dim_{k(a^{1/p})}\biggl(\frac{\mathfrak{m}_{R’}}{\mathfrak{m}_{R’}^2}\biggr) = 2.$$
