Does every nontrivial sheaf of rings have a maximal ideal? Let $R$ be a sheaf of rings on a topological space $X$. Assume $R \neq 0$. Does then $R$ have a maximal ideal? So this is a spacified analogon of the theorem, that every nontrivial ring has a maximal ideal. Currently I try to develope this sort of spacified commutative algebra and algebraic geometry. If anyone knows some literature about it, please let me know.
So let's try to imitate the known proof for rings and use Zorn's Lemma. For that, we need that for every linear ordered set $(J_k)_{k \in K}$ of proper ideals in $R$, their sum $\sum_{k \in K} J_k$ is also a proper ideal. Note that if we replace $R \neq 0$ by $R_x \neq 0$ for all $x \in X$ and the notion proper by "stalkwise proper", then everything works out fine since stalks and sum commute. However, global sections do not commute with (infinite) sums. Anyway, let's try to continue:
Assume $\sum_{k \in K} J_k = R$, that is, $1$ is a global section of the sum. Then there is an open covering $X = \cup_{i \in I} U_i$, such that $1 \in \sum_{k \in K} J_k(U_i) = \cup_{k \in K} J_k(U_i)$. Thus we get a function $I \to K, i \mapsto k_i$, such that $1 \in J_{k_i}(U_i)$. If this function has an upper bound, say $k$, then we get a contradiction $J_k=R$. Thus the function is unbounded. And now?
I think that this already indicates that there will be counterexamples, but I'm not sure. Also note that everything is fine when $X$ is quasi compact.
 A: Take $X=\mathbf Z$ with topology $(k,\infty)\cap\mathbf Z$ for $-\infty\leq k\leq\infty$, so that sheaves on $X$ may be identified with sequences $\dots\to F_k\to F_{k+1}\to\dots$, $k\in\mathbf Z$. Now take for $R$ the constant sheaf with value $\mathbf Q$. All ideals have the form $\dots\to0_{k-1}\to0_k\to\mathbf Q_{k+1}\to\mathbf Q_{k+2}\to\dots$ for some $-\infty\leq k\leq\infty$, so there are no maximal ideals.
A: One could have guessed that the answer is "no" through the following reasoning:
A sheaf of rings on a space $X$ is a ring object in the topos of sheaves on $X$, and your question is about ring theory in that topos. But such a topos (unless $X$ is very close to being discrete, see e.g. comments here) can be seen as an intuitionistic universe of sets, where the axiom of choice and Zorn's lemma are not valid.
This can be made precise; you can interpret formal languages in a topos and you have certain proof systems obeying intuitionistic rules which are sound and complete with respect to the topos interpretation. The soundness part tells you that whenever you manage to prove a theorem about rings according to the intuitionistic rules it will also be valid for sheaves of rings. Here you have to make a distinction between first order and higher order languages - both are interpretable in toposes. Your question about ideals is a higher order question since it talks about subsets of a ring. Anyway both justify the point of view that you are doing ring theory in an intuitionistic set universe.
A nice and very friendly written example of such reasoning is this article of Mulvey, "Intuitionistic Algebra and Representations of rings", in which he gives an intuitionistic proof of a theorem of Kaplansky to conclude that it holds for sheaves of rings (and then draws nice consequences). If you are interested in this way of reasoning about sheaves of rings it is definitely the article for you - and you don't have to read Johnstone first, he does it all from scratch and talks about both, 1st and higher order, in a colloquial way.
The clearest written precise accounts of this are IMHO section D1 of Johnstone's Elephant for 1st order and D4 for higher order, but they are a bit more general than what you need, see the last paragraph, the treatment of Mulvey, is closer to your setting. 
A beautiful feature of the 1st order version (e.g. Johnstone, section D3) is that you have a universal ring object living in a certain topos (the "classifying topos" for rings) which satisfies exactly those 1st order statements which are provable in any topos. So whenever you can prove something about this particular ring object you can be sure it holds for all sheaves of rings on a space; see MacLane/Moerdijk's Sheaves in geometry and Logic, section VIII.5 for this universal ring object.
The existence of a classifying topos also leads to the following excellent news: For formulas of a certain syntactic form, called "geometric formulas", there are the theorems of Deligne and Barr (see Johnstone) which tell you that whenever you can prove such a formula using classical reasoning there also exists an intuitionistic proof - so you don't have to bother restricting your logic in these cases!
Since you said that you are also interested in "spacified" algebraic geometry: There is an article by Anders Kock, "Universal Projective Geometry via Topos Theory", J. Pure Appl. Algebra 9 (1976), 1-24, where he does projective geometry over this universal ring, presumably again obtaining statements which hold over any sheaf of rings (but I only skimmed that one long ago).
To sum up: If you can prove something intuitionistically (in a non-defined loose sense) you have good chances to be able to translate your proof into the formal systems from above and then you know that your result is true about rings in any topos. If you manage to express a 1st order statement in a certain syntactic form (as a "geometric formula") and can prove it with classical logic you can also conclude that it holds for any ring in a topos. 
Important note: "Ring in a topos" is a more general class of objects than you seem to be interested in, you want to know about "rings in a spatial topos" (i.e. topos of sheaves on a topological space), and there more will be true. So even if a statement does e.g. not hold for the universal ring (which lives in a non-spatial topos) it might still be true for all rings in spatial toposes.
