A group land on a planet and their spaceship is wrecked in an explosion. The planet is rich in diamonds and poor in other minerals. To get home they invent an anti gravity drive and take the planet with them.
This was in a collection of short stories; this one, I think, was named 'The Mother of Invention'.