Read this little dialogue between A and B.

A: Have you ever ridden a roller coaster?
B: No. I have never ridden it.

The pronoun "it" in B's sentence sounds wierd. For me, the following sounds better "No. I have never ridden one."

Are there some cases when the pronoun "it" cannot be used as a replacement of a noun?

the is to it as a(n) is to one.

Have you ... the roller coaster?
...... ridden it.

Have you ... a roller coaster?
...... ridden one.

a roller coaster is general. " one " is the correct word here.

when you refer something indentifed, you need to use " it "

for example, can i borrow your car ? sorry, I need it.
 CalifJim's reply was promoted to an answer.