# Free objects in category of algebras

I read in the book "Category Theory By Steve Awodey" the following statement:

The axiom of choice implies that all sets are projective, and it follows that free objects in many (but not all!!) categories of algebras are also projective.

I didn't get the meaning of but not all!! What is simple example of such a category of algebras in which free objects are not projective?

The reduction to the case of sets that Avodey refers to only works as long as the forgetful functor to $\textsf{Sets}$ preserves epimorphisms, that is, turns categorical epimorphisms into surjections (=epimorphisms) of sets.
However, it does not hold for the forgetful functor $\textsf{CommRng}\to\textsf{Set}$: The inclusion ${\mathbb Z}\hookrightarrow {\mathbb Q}$ is both a categorical monomorphisms and a categorical epimorphism, but it's not a surjection on the underlying sets. Indeed, no free object in $\textsf{CommRng}$ is projective: e.g., the homomorphism ${\mathbb Z}[X]\to {\mathbb Q}$ with $X\mapsto \frac{1}{2}$ does not factor through ${\mathbb Z}\twoheadrightarrow {\mathbb Q}$.