Let $R=k[x]$ and $M=k[x^{\pm1}]$ viewed as an $R$-module in the obvious way. One can easily check that it is not finitely generated, not divisible and it is flat because it is a localization. To check that it is not projective, consider the map $\phi:\bigoplus_{n\in\mathbb Z}Re_n\to M$ from the free $R$-module with basis $\\{e_n:n\in\mathbb Z\\}$ to $M$ such that $\phi(e_n)=x^n$ for all integers $n$. The map is clearlyu surjective. If $M$ were projective, there would be a section $s:M\to \bigoplus_{n\in\mathbb Z}Re_n$, and in particular an injective homomorphism. Now the image of $1\in M$ under $s$ has to be infinitely divisible by $x$, and there are no such elements in the free module.
One can do exactly the same with more variables.