If you're using a ruby version manager such as rbenv that relies on bash shims, try launching VS Code from the terminal. This should allow VS Code to pick up on the env variables that rbenv sets. Alternatively you can set your env vars in launch.json
, but this is not a very maintainable solution.