It’s one of these basic things that easily go wrong – it took me ages to get rice done decently when switching from an eletric stove to gaz, even though the procedure is pretty much identical.
I generally prefer Basmati rice, which I soak for about half an hour to an hour, then bring it to boil with the same quantity of liquid like the rice and a bit of salt. If you don’t have the time to let it soak before, use a ratio of rice : water of about 1 : 1,25. In both cases, bring the rice to boil, then cover and let it simmer at the lowest flame when using a gas stove, or switch off the heat completely when using an electric stove. Do not open the lid for the first 2/3 of the cooking process, then carefully stir with a fork.
When using long grain rice, don’t let it soak and use a ratio of about 1 : 1,66, then proceed as described above. The cooking process will take a bit longer.