TITLE: Does $\operatorname{Spec}$ preserve pushouts?
QUESTION [6 upvotes]: The spectrum-functor
$$
\operatorname{Spec}: \mathbf{cRng}^{op}\to \mathbf{Set}
$$
sends a (commutative unital) ring $R$ to the set $\operatorname{Spec}(R)=\{\mathfrak{p}\mid \mathfrak{p} \mbox{ is a prime ideal of R}\}$ and a morpshim $f:S\to R$ to the map $\operatorname{Spec}(R)\to \operatorname{Spec}(S)$ with $\mathfrak{p}\mapsto f^{-1}(\mathfrak{p})$. Does this functor send pullback squares
\begin{eqnarray}
S\times_R T&\to& T\\
\downarrow && \downarrow\\
S&\to& R
\end{eqnarray}
of (commutative unital) rings to pushout squares 
\begin{eqnarray}
\operatorname{Spec}(R)&\to& \operatorname{Spec}(T)\\
\downarrow && \downarrow\\
\operatorname{Spec}(S)&\to& \operatorname{Spec}(S\times_R T)
\end{eqnarray}
of sets? Put in other words, does the functor $\operatorname{Spec}$ from above preserve pushouts?

REPLY [3 votes]: Pullbacks in $\mathbf{CRing}$ do not necessarily go to pushouts in $\mathbf{Sch}$ or $\mathbf{Set}$. Consider the construction of $\mathbb{P}^1_k$: in $\mathbf{Sch}$ (resp. $\mathbf{Set}$), we have the following pushout square,
$$\require{AMScd}
\begin{CD}
\mathbb{A}^1_k \setminus \{ 0 \} @>>> \mathbb{A}^1_k \\
@VVV @VVV \\
\mathbb{A}^1_k @>>> \mathbb{P}^1_k
\end{CD}$$
but if pullbacks in $\mathbf{CRing}$ go to pushouts in $\mathbf{Sch}$ (resp. $\mathbf{Set}$), that would imply that $\mathbb{P}^1_k \cong \operatorname{Spec} k$, which is nonsense.