bug: The terminal in VS Code cannot find the ruby version installed by asdf (again)
mickeymarse opened this issue · 2 comments
Describe the Bug
As per issue #1584, my VS Code terminal uses the default ruby installation rather than the asdf one.
The main difference is that I use Linux Mint as my OS.
The error I receive is:
ruby: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
Steps to Reproduce
- Open VS Code
- Open integrated terminal
- Exec ruby -v
Expected Behaviour
The terminal in VS Code can use the ruby installed by asdf.
Actual Behaviour
The terminal in VS Code uses the ruby version previously installed without asdf.
Environment
OS:
Linux bialetti 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
SHELL:
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
BASH VERSION:
5.1.16(1)-release
ASDF VERSION:
v0.14.0-23f4ce5
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/moka/.asdf
ASDF_DIR=/home/moka/.asdf
ASDF_CONFIG_FILE=/home/moka/.asdfrc
ASDF INSTALLED PLUGINS:
ruby https://github.com/asdf-vm/asdf-ruby.git master 1c78864
asdf plugins affected (if relevant)
No response
I already added a comment on issue #1726, so just referencing it here. I'm also seeing the same bug , but on Mac -> #1584 (comment)
@mickeymarse Check out my comment here - it was the order in which asdf
was added/loaded in $PATH when VS Code was reading it. Still not sure about the root cause, but the solution was to force load order in the fish/config file. .bashrc or .bash_profile equivalent