Conflict between Gauss' theorem and the example $\mathbb{Z}[\sqrt{-5}]$

Gauss' theorem says that if $R$ is a UFD then so is $R[t]$.

However, it is clear that in $\mathbb{Z}[\sqrt{-5}]$, there exists irreducible elements that are not prime ($x=1+\sqrt{-5}$). Since an element in a UFD is irreducible iff it is prime, we can see $\mathbb{Z}[\sqrt{-5}]$ is not a UFD - but Gauss' theorem says it is.

What am I missing here? Is there some other condition that applies to the $R$ in Gauss' theorem? How to resolve the apparent conflict? Or is there no conflict and I've misunderstood something?

• $R[t]$ referes the the polynomial ring over $R$ in one variable. Not to some quotient of that ring (i.e. $t$ is not allowed to be a root of any polynomial over $R$). – Tobias Kildetoft Dec 7 '15 at 8:29
• The notation $R[t]$ refers to one specific ring, the ring of all polynomials in $t$ over $R$. The $t$ is not a variable for assigning an arbitrary number (the theorem is not saying: for every number $t$, $R[t]$ is a UFD.) – Ted Dec 7 '15 at 8:36

Gauss's Theorem applies exclusively to the polynomial ring $R[x]$. $\mathbb{Z}[\sqrt{-5}]$ is not a polynomial ring in $\mathbb{Z}$, it's the quotient of a polynomial ring by $x^2+5$.