There are a number of sources for rubies with the two most important ones being Myanmar (formerly Burma) and Mozambique. Other ruby locations include Sri Lanka, Afghanistan, Pakistan, Pailin, Madagascar, and more, but it might be better to specify what type of environment rubies form in rather than the long list of countries.
Rubies form in an environment of super-heated, mineral rich waters with low silica and low iron. Note that silica is one of the most common elements on earth, along with iron. To be rubies instead of sapphires (corundum colored with red instead of blue), rubies also need chromium, which is a much rarer element. Due to a number of specific geological conditions, most countries around the Indian Ocean have rubies like the east coast of Africa, parts of the middle east, most south asian countries including Myanmar (formerly Burma) and in parts of south China. Rubies have been found in Greenland too (the big white area at the top of the map), though the quality and production amount does not come close to the main commercial locations like Myanmar and Mozambique.
The two main providers of rubies in the world are Mozambique and Myanmar (specifically its Mogok and Mong Hsu mines). The historical producer of rubies is Mogok in Myanmar, which has been producing them longer than any other known ruby mines, including the neighboring Mong Hsu mine. By comparison the Mozambique mines are very recent with gem-quality rubies confirmed in the 1990s, and full-scale mining beginning over 15 years later
Mainly due to the long-standing ruby mining and even culture around them, the Burmese rubies from Mogok are considered to be the standard in fine-quality rubies. However, no mining source produces a specific, single-color of rubies. It is a range of colors and inclusions that are not always enough to determine where they came from.
R11963 | medium | “Ruby ID: R11963”
R5858 | medium | “Ruby ID: R5858”
R12426 | medium | “Ruby ID: R12426”
The dark colors and high clarity are usually associated with Mozambique and Pailin rubies, but as seen above this is possible in Burmese rubies too. No source produces a single color either, usually having a pink or purple modifier, with orange modifiers being judged harshly.
The only eye-visible difference between rubies from various sources is that ones like the Mozambique rubies have higher iron in them versus Myanmar rubies. This is due to the host material with the Mozambique rubies being basalt-hosted (high iron environment) and Myanmar rubies being marble-hosted (low iron environment). The iron in the Mozambique rubies also inhibits fluorescence, which shows up very prominently in marble-hosted rubies.
The host material is not unique to these locations either since most rubies from Africa will be high-iron (Madagascar does have marble-hosted rubies), and Vietnam has low-iron rubies that can be very similar to Burmese rubies. As stated previously, there can be significant overlap with appearance and properties in gem material with different origins.
A highly trained lab gemologist can often identify origin based on inclusions, though each combination of inclusions does not always make this possible. Expensive lab equipment and data analysis is more consistent with detailing ruby origins, but the results are not always conclusive. The lab evaluating the gemstone might give a probable area or write that the identification information is lacking in these cases, depending on the procedures for each lab.