I've been studying projective modules in Rotman, as well as the topic of localization. Now on the Wikipedia article about them, there's an example of a locally free module that is not projective. The module in question is $R/I$ where $R$ is a direct product of countably infinite copies of $\mathbb{F}_2$ and $I$ is a direct sum of countably infinite copies of $\mathbb{F}_2$.
I understand why it is locally free, but in order to explain why it is not projective they mention the following theorem: If $I$ is an ideal of a commutative ring $R$ such that $R/I$ is a projective $R$-module, then $I$ is a principal ideal.
I'm not sure how to prove this (more general) theorem. I feel like I'm missing an obvious map to show that $I$ not principal implies $R/I$ not projective.