TITLE: A ring on which all finitely generated projectives modules are free but not all projectives are free?
QUESTION [11 upvotes]: Dear all, 
Sorry if the question is naive: any nice example of such a ring or, better, of a class of such rings?

REPLY [29 votes]: Cher Michel, these rings are uncommon.
1) Over a local ring ALL projective modules are free : this is a celebrated theorem due to Kaplansky.
2) If  $R$ is commutative noetherian and $Spec(R)$ is connected, every NON-finitely generated projective module is free. This is due to Bass in his article "Big projective modules are free" which you can download for free here 
http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body&id=pdf_1&handle=euclid.ijm/1255637479
And now for the good news:  the rings you are after are uncommon but they exist. Bass in the article just quoted shows that the ring $R=\mathcal C([0,1])$ of continuous functions on the unit interval has all its finitely generated projective modules free. Nevertheless the ideal consisting of functions vanishing in a neighbourhood of zero (depending on the function) is projective, not finitely generated and not free. Bass attributes the result to Kaplansky.