'$R$-rational points,' where $R$ is an arbitrary ring On page 49 of Liu's Algebraic Geometry and Arithmetic Curves, we find Example 3.32. In it, he shows that if $k$ is a field and $X=k[T_1,\dots,T_n]/I$ is an affine scheme over $k$, the sections $X(k)$ (the $k$-rational points of $X$) are in bijection with the algebraic set $Z(I)$ cut out by $I$. This is the set of all $\alpha\in k^n$ with $P(\alpha)=0$ for every $P(T)\in I$. 
At the end of the section, he gives this exercise:

$\textbf{3.6}$ Generalize Example 3.32 to the case where $k$ is an
  arbitrary ring.

How is this possible? The proof in the example makes essential use of the fact that $k$ is a field. Clearly we want to consider the set cut out by $I$ over $R^n$, where $R$ is some ring, and relate this to the sections $X(R)$, but I do not see how to proceed. In particular, the proof identified the $k$-rational points with the points where the residue field was $k$. Since the residue field is always a field, but $R$ may not be, we can no longer use the residue field to identify the $R$-rational points. 
 A: Let $X = \text{Spec}\,A$ be an affine scheme of finite type over $R$. Then $X$ comes with a map $X\rightarrow \text{Spec}\,R$ so that the corresponding map of rings $R\rightarrow A$ makes $A$ a finitely generated $R$-algebra. So we can write $A \cong R[T_1,\dots,T_n]/I$ for some ideal $I$.
Now $X(R)$, the $R$-points of $X$, are maps $\text{Spec}\,R \rightarrow X$ which are sections of the map $X \rightarrow \text{Spec}\,R$. Since we're talking about maps of affine schemes, these are in canonical bijection with ring maps $A \rightarrow R$ which are sections of the structure map $R\rightarrow A$, that is, $R$-algebra homomorphisms $R[T_1,\dots,T_n]/I\rightarrow R$.
Now since $R[T_1,\dots,T_n]$ is the free $R$-algebra on $n$ generators,
\begin{align}
\text{Hom}_R(R[T_1,\dots,T_n]/I,R) &\cong \{f\in\text{Hom}_R(R[T_1,\dots,T_n],R)\,|\,I\subseteq \text{Ker}(f)\}\\
&\cong \{(r_1,\dots,r_n)\in R^n\,|\,p(r_1,\dots,r_n) = 0\,\text{for all}\,p\in I\}.
\end{align}
A: Let $Y=$ Spec $R$. The $R$-valued points of $X$, $\hspace{1mm} X(R)$, are the elements of Hom$(Y,X)$, which are in bijection with Hom$(k[T_1,\ldots,T_n]/I,R)$. Thus, $X(R)$ is in bijection with the tuples $\alpha=(a_1,\ldots,a_n) \in R^n$ for which $P(\alpha)=0$ for all $P \in I$.
