Commutative ring with an ideal that contains all the nonunits 
Is there an example of a commutative ring with an ideal that contains all the non-units? 

I was trying to think of some subring of $\mathbb Q$, but I couldn't get it to work.
 A: Atiyah-Macdonald's book: "Introduction to commutative algebra" explains what Jake says:  

Proposition 1.6. i) Let $A$ be a ring and $\mathfrak{m} \neq (1)$ an ideal of $A$ such that
  every $x \in A - \mathfrak{m}$ is a unit in $A$. Then $A$ is a local ring and $\mathfrak{m}$ is its maximum ideal.
  ....
  ii) Let $A$ be a ring and $\mathfrak{m}$ a maximal ideal of $A$, such that every element of
  $1 + \mathfrak{m}$ (i.e., every $1 + x$, where $x \in \mathfrak{m}$) is a unit in $A$. Then $A$ is a local ring.
Proof. i) Every ideal $\neq (1)$ consists on non-units, hence is contained in $\mathfrak{m}$. Hence $\mathfrak{m}$ is the only maximum ideal of $A$.

So note that for a commutative ring $R$ these are equivalent:  

  
*
  
*The ring $R$ is local  ,
  
*The set $m$ of non-units is an ideal,
  
*The set $m$ of non-units is the only maximal ideal.  
  

For example the ring $k[[X]]$, where $k$ is a field.
A: Take the ring $R$ of $2 \times 2$ matrices $A = [a_{ij}]$ with $a_{11} = a_{22}$ and $a_{21} = 0$
over a field $F,$ and let $I$ be the ideal consisting of those matrices in $R$ with with $a_{11} = a_{22} = 0.$
A: Take $R=\mathbb Z / 9 \mathbb Z$ and $I=3R$. Then $I=\{0, 3, 6\}$, which are exactly the non-units.
More generally, $R=\mathbb Z / p^2 \mathbb Z$ and $I=pR$, where $p$ is a prime.
