Must a ring (commutative, with 1), in which every non-zero ideal is prime, be a field? An early exercise in Irving Kaplansky's commutative rings asks:
Let R be a ring. Suppose that every ideal in R (other than R) is prime. Prove that R is a field. 
This is easy if we assume the zero ideal is prime. But is this assumption necessary?
If every non-zero ideal is prime, then for any non-unit $x \in R$ and with $x^{n+1} \ne 0$ we must have $\langle x \rangle \subseteq \langle x^{n+1} \rangle$, which requires the existence of an element $y$ satisfying:
$$
x(1-x^ny) = 0
$$
The collection of these and similar relations on the elements seems rather restrictive, but I would appreciate a simple and incisive argument to show that the condition that all non-zero ideals are prime can only be met by rings with trivial spectrum, or, if my guess is incorrect and this is untrue, a counter-example.
 A: This is false.  For instance, let $R=K\times L$ where $K$ and $L$ are fields.  Then the only nonzero proper ideals in $R$ are $K\times 0$ and $0\times L$, which are both prime, but $R$ is not a field.
For another example, consider $R=\mathbb{Z}/(p^2)$ for any prime $p$.  The only nonzero proper ideal is $(p)$ which is prime.
Here is a classification of all the examples.  Suppose $R$ is a ring in which every nonzero proper ideal is prime.  For any prime $P\subseteq R$, then $R/P$ has the same property but is a domain, and so must be a field.  Thus in fact every nonzero proper ideal is maximal.
If $R$ has two different nonzero proper ideals $P$ and $Q$, then we must have $P\cap Q=0$ (since the intersection is a non-maximal proper ideal).  By the Chinese remainder theorem we then get an isomorphism $R\cong R/P\times R/Q$ and so $R$ is a product of two fields.
If $R$ has exactly one nonzero proper ideal $P$, then $P$ is the nilradical of $R$ (since it is the unique prime ideal) and is principal (generated by any of its nonzero elements).  This implies $P^2=0$ (otherwise it would be a smaller nonzero proper ideal) and that $P\cong R/P$ as an $R$-module (otherwise $P$ would be an $R/P$-vector space of dimension greater than $1$ and so would have a nontrivial proper subspace).  If the quotient map $R\to R/P$ has a section which is a ring-homomorphism, then we can identify $R$ with $K[x]/(x^2)$ where $K$ is the field $R/P$.  But such a section may not exist, as shown by the example $R=\mathbb{Z}/(p^2)$ above.
Finally, if $R$ has no nonzero proper ideals, it is either a field or the zero ring.
All of these cases can be joined together into the following equivalent characterization: $R$ is a ring in which every nonzero proper ideal is prime iff $R$ is an artinian ring of length at most $2$ as a module over itself.
