Error when trying to run code editor: JetBrains Rider or Fleet. Could not find path to the editor

Godot Version

4.2.1

Question

I followed the instructions according to https://docs.godotengine.org/en/latest/tutorials/scripting/c_sharp/c_sharp_basics.html#jetbrains-rider, but whenever I try to open a .cs file to edit it, I get this:

/root/godot/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs:114 - Error when trying to run code editor: JetBrains Rider or Fleet. Could not find path to the editor.

I even configured Editor Settings > Dotnet > Editor > Custom Exec Path to point to Rider’s startup.sh file, but to no avail.
It should be noted that when I set Editor Settings > Dotnet > Editor to Custom, but with Editor Settings > Dotnet > Editor > Custom Exec Path pointing to Rider’s startup.sh file, it works fine.