3 added 409 characters in body

This is not an answer to the question, but is intended to show that Martins's concern about the possible distinction between the colimit in the category of schemes vs. in the category of locally ringed spaces is a valid one. Indeed, if I haven't blundered below, then it seems that in some circumstances at least the direct limit (colimit) of schemes exists, but does not coincide with the direct limit in the category of locally ringed spaces.

For example, suppose that $X_n$ is the Spec of $k[x]/(x^n),$ for some field $k$ (and the transition maps are the obvious ones). Then the direct limit of the $X_n$ in the category of locally ringed spaces is a formal scheme which is not a scheme, whose underlying topological space is a point, and whose structure sheaf (which is in this context simply a ring, namely the stalk at the unique point) is $k[[x]]$.

On the other hand, suppose given compatible maps from the $X_n$ to a scheme $S$. These must all map the common point underlying the $X_n$ to some point $s \in S$, which lies in some affine open Spec $A$. Thus the maps from the $X_n$ factor through Spec $A$, and correspond to compatible maps $A \rightarrow k[x]/(x^n),$ i.e. to a map $A \rightarrow k[[x]].$ This in turn gives a map Spec $k[[x]] \rightarrow$ Spec $A\subset X,$ and so we see that the natural compatible maps from the $X_n$ to Spec $k[[x]]$ identify Spec $k[[x]]$ with the direct limit of the $X_n$ in the category of schemes.

EDIT: As is noted in a comment of David Brown's attached to his answer, this example generalizes, e.g. if $I$ is an ideal in a ring $A$, then the direct limit in the category of schemes of Spec $A/I^n$ coincides with Spec $\hat A$, where $\hat A$ is the $I$-adic completion of $A$.

FURTHER EDIT: I am no longer certain about the claim of the previous paragraph. If $A/I$ (and hence each $A/I^n$) is local then for any scheme $S$ the maps Spec $A/I^n \to S$ factor through an affine open subscheme, so one reduces to computations in the category of rings, and hence finds that indeed the direct limit of the Spec $A/I^n$ equals Spec $\hat{A}$. More generally, I'm currently unsure ... .

2 added 284 characters in body

This is not an answer to the question, but is intended to show that Martins's concern about the possible distinction between the colimit in the category of schemes vs. in the category of locally ringed spaces is a valid one. Indeed, if I haven't blundered below, then it seems that in some circumstances at least the direct limit (colimit) of schemes exists, but does not coincide with the direct limit in the category of locally ringed spaces.

For example, suppose that $X_n$ is the Spec of $k[x]/(x^n),$ for some field $k$ (and the transition maps are the obvious ones). Then the direct limit of the $X_n$ in the category of locally ringed spaces is a formal scheme which is not a scheme, whose underlying topological space is a point, and whose structure sheaf (which is in this context simply a ring, namely the stalk at the unique point) is $k[[x]]$.

On the other hand, suppose given compatible maps from the $X_n$ to a scheme $S$. These must all map the common point underlying the $X_n$ to some point $s \in S$, which lies in some affine open Spec $A$. Thus the maps from the $X_n$ factor through Spec $A$, and correspond to compatible maps $A \rightarrow k[x]/(x^n),$ i.e. to a map $A \rightarrow k[[x]].$ This in turn gives a map Spec $k[[x]] \rightarrow$ Spec $A\subset X,$ and so we see that the natural compatible maps from the $X_n$ to Spec $k[[x]]$ identify Spec $k[[x]]$ with the direct limit of the $X_n$ in the category of schemes.

EDIT: As is noted in a comment of David Brown's attached to his answer, this example generalizes, e.g. if $I$ is an ideal in a ring $A$, then the direct limit in the category of schemes of Spec $A/I^n$ coincides with Spec $\hat A$, where $\hat A$ is the $I$-adic completion of $A$.

1

This is not an answer to the question, but is intended to show that Martins's concern about the possible distinction between the colimit in the category of schemes vs. in the category of locally ringed spaces is a valid one. Indeed, if I haven't blundered below, then it seems that in some circumstances at least the direct limit (colimit) of schemes exists, but does not coincide with the direct limit in the category of locally ringed spaces.

For example, suppose that $X_n$ is the Spec of $k[x]/(x^n),$ for some field $k$ (and the transition maps are the obvious ones). Then the direct limit of the $X_n$ in the category of locally ringed spaces is a formal scheme which is not a scheme, whose underlying topological space is a point, and whose structure sheaf (which is in this context simply a ring, namely the stalk at the unique point) is $k[[x]]$.

On the other hand, suppose given compatible maps from the $X_n$ to a scheme $S$. These must all map the common point underlying the $X_n$ to some point $s \in S$, which lies in some affine open Spec $A$. Thus the maps from the $X_n$ factor through Spec $A$, and correspond to compatible maps $A \rightarrow k[x]/(x^n),$ i.e. to a map $A \rightarrow k[[x]].$ This in turn gives a map Spec $k[[x]] \rightarrow$ Spec $A\subset X,$ and so we see that the natural compatible maps from the $X_n$ to Spec $k[[x]]$ identify Spec $k[[x]]$ with the direct limit of the $X_n$ in the category of schemes.