In Fellowship of the Ring "The Shadow of the Past", Frodo asks about destroying the One Ring. Gandalf says:
It has been said that dragon-fire could melt and consume the rings of power but there is not now any dragon left on earth in which the old fire is hot enough, nor was there ever any dragon, not even Ancalagon the Black, who could have harmed the One Ring, the Ruling Ring, for that was made by Sauron himself.
How does Gandalf know this? Did any of the 19 rings of power get destroyed by dragon fire in the past? If not, then what makes him think that the rings of power can be destroyed by dragon-fire, but not the One Ring?