virtualenvrbenvpyenv

Not able to switch from Python to Ruby development envrionment in Ubuntu WSL


I'm having difficulties to switch from Python environment to Ruby environment. The terminal seems like not responding no matter how many time I keyed in rbenv global 3.1.2. It stuck at pyenv 3.10.6. I couldn't switch to rbenv 3.1.2. Can someone help please?

enter image description here

I have restarted and also tried solutions from ChatGPT it doesn't help.


Solution

  • switch from Python environment to Ruby environment

    Both are active at the same time. Selecting a Ruby environment with rbenv won't deactivate the Python environment previously selected with pyenv. You can check that both are active by looking at the version output of ruby -v and python --version.

    On the screenshot, your shell prompt shows only the Python environment. This doesn't mean that the Ruby environment is not active. It means that your shell prompt is not able (or not configured) to show both. You may want to ask a separate question about configuring your shell prompt to show both the Python and Ruby environments, or configuring it to show the Ruby environment only.