[Solved] “/bin/sh 1 cd can’t cd to //wsl$/….” in JetbrainsIDEs (PyCharm, RubyMine etc.)

So, you’re a developer on Windows (because you want to play games and not rich enough to have multiple machines) and you rely on WSL2 for your development. You were using VScode and living a happy life but people keep pressuring you to give Jetbrains IDEs a try. So, you finally give up explaining why VScode is a great editor and thought of giving Jetbrains stuff a shot. But after installing you can create your remote with WSL but whenever you want to use those IDE features to install the dependencies and manage other things you’re hit with this annoying error:

/bin/sh 1 cd can't cd to //wsl$/home/username/project_dir

The problem with this error is that the solution for this error is actually on the official Jetbrains Documentation but they marked it as an optional step? WTF? Without this crucial step, most of the IDE features are just useless. So to solve this one just have to map (follow the official documentation) the project dir to the Unix directory, like:

//wsl$/home/username/project_dir -> /home/username/project_dir

And the problem should be solved.