TITLE: Example of codim 1 regular embedding that is not an effective Cartier divisor?
QUESTION [14 upvotes]: An effective Cartier divisor on a scheme $X$ (a closed subscheme of $X$ that is locally cut out by one equation that is not a zero-divisor) is always a regular embedding of codimension 1 (in the stalks, it is cut out by one equation that is not a zero-divisor).  The converse is true if $X$ is locally Noetherian, using Nakayama's lemma to "lift" from the stalk to an "honest neighborhood".  

Is there a (necessarily non-Noetherian) example of a codimension 1 regular embedding that is not an effective Cartier divisor?

(See section 8.4.7 of the March 23, 2013 version of the notes here for some discussion, if you care.)
I am asking this out of idle curiosity rather than any need for it, but I am genuinely curious.

REPLY [19 votes]: Let $(A,m,k)$ be a discrete valuation ring. Consider the subring $R\subset A^\mathbb{N}$ of converging sequences (for the discrete topology on $A$), i.e. ultimately constant sequences. We have a morphism $\varphi:R\to A$ sending any sequence to its limit. Put $\mathfrak{p}=\varphi^{-1}(m)$: this is the maximal ideal of sequences with noninvertible limit. 
Now it is easy to check that $\varphi$ induces an isomorphism $R_\mathfrak{p}\cong A$. In particular, $\mathfrak{p}$ becomes principal in $R_\mathfrak{p}$, and of course also in $R_\mathfrak{q}$ for all $\mathfrak{q}\neq\mathfrak{p}$ because then $\mathfrak{p}R_\mathfrak{q}=R_\mathfrak{q}$. So $V(\mathfrak{p})\subset\mathrm{Spec}\,(R)$ is a regular embedding of codimension 1.  
On the other hand, $\mathfrak{p}$ is not finitely generated. Indeed, if $J\subset\mathfrak{p}$ is a finitely generated ideal, there is an $N\in\mathbb{N}$ such that for each $u:\mathbb{N}\to A$ in $J$ and each $n>N$ we have $u(n)\in m$. Clearly there is no such $N$ for $\mathfrak{p}$.