In Sonic and the Black Knight, you can find rubies in basically any area—but they're most common in the Molten Mine.
If you're specifically farming for them, that's the place to head. Otherwise, just keep exploring and you'll scoop them up along the way.