I feel like asdf is only going to spring to action when it sees a .tools-versions (or .ruby-version if you have it set to look for that) in the CWD. Does your preview filter explicitly set a home directory?
(That's my only idea, as I haven't played with asdf in relation to BBEdit, or created any preview filters) On Sat, Aug 9, 2025 at 7:38 PM Christopher Waterman <[email protected]> wrote: > I manage my versions of Ruby with asdf <https://asdf-vm.com>. > > I have a test script. > > #!/usr/bin/env ruby > puts RUBY_VERSION > puts ENV['PATH'] > > When I use the* !#* > *Run* command I get these results: > > > *2.6.10/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/VMware > Fusion.app/Contents/Public:/usr/local/go/bin:/Users/chris/.asdf/shims* > > That is the system ruby not the one a have set through asdf. > When I remove the shebang line from the script I get: > > > *2.7.4/Users/chris/.asdf/installs/ruby/2.7.4/bin:/Users/chris/.asdf/installs/ruby/2.7.4/lib/ruby/gems/.0/bin:/Users/chris/.asdf/shims:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/VMware > Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/iTerm.app/Contents/Resources/utilities* > > This is the result I expect. It is also the result I get if I run the > script from the terminal running zsh as my shell. > > It's my understanding that BBEdit uses your shell's configuration when the > shebang is available but makes it's best guess when it isn't. Am I correct? > > This is my .zprofile > > > > > *export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"eval "$(direnv > hook zsh)"export DIRENV_LOG_FORMAT=""export JRUBY_OPTS="$JRUBY_OPTS > -J-XstartOnFirstThread"* > > Does anyone else use asdf and ruby who can replicate this result? > Have you had a similar issue? > Any advice on how I might track this down? > > Or am I off base and these are the expected results? > > I'm working a a preview filter and it will only use the system version of > ruby and that won't work for what I'm doing. > > -- > This is the BBEdit Talk public discussion group. If you have a feature > request or believe that the application isn't working correctly, please > email "[email protected]" rather than posting here. Follow @bbedit on > Mastodon: <https://mastodon.social/@bbedit> > --- > You received this message because you are subscribed to the Google Groups > "BBEdit Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/bbedit/17ec14fb-89c4-4b2a-aa9f-ed9474a53d8dn%40googlegroups.com > <https://groups.google.com/d/msgid/bbedit/17ec14fb-89c4-4b2a-aa9f-ed9474a53d8dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bbedit/CACArFYX%2BJwZnp%3DhLJk9iV9u%2BWv4t0BkW5oBGCSjx6_LMh9LZJQ%40mail.gmail.com.
