asdf-vm/asdf

bug: Error no asdf when trying to run sass (No preset version installed for command sass)

Victorcorcos opened this issue · 4 comments

Describe the Bug

When I try to run sass, there is an error on the asdf

  • No preset version installed for command sass

Steps to reproduce

1. Install sass

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install sass/sass/sass

2. Run sass

sass --version

Expected Behaviour

The sass should be executed properly.

Actual Behaviour

Output

Screen Shot 2023-09-29 at 19 36 34
No preset version installed for command sass
Please install a version by running one of the following:

asdf install ruby 3.0.6

or add one of the following versions in your config file at /Users/victorcosta/Desktop/repositories/dpms-front-norway/.tool-versions
ruby 2.6.8
  1. When I execute the recommended command: asdf install ruby 3.0.6, it just says: ruby 3.0.6 is already installed
  2. I also tried to do asdf reshim ruby, but it doesn't work.

Does someone know how to fix it?

Thanks!

Environment

$ asdf info
OS:
Darwin Victors-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Thu Mar  9 20:39:26 PST 2023; root:xnu-7195.141.49.700.6~1/RELEASE_X86_64 x86_64

SHELL:
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.12.0

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/victorcosta/.asdf
ASDF_DIR=/usr/local/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/victorcosta/.asdfrc

ASDF INSTALLED PLUGINS:
python                       https://github.com/tuvistavie/asdf-python.git master 8505457
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 8cb9721

Example

asdf plugins affected (if relevant)

No response

I want to run the global sass, installed by brew install sass/sass/sass.

However, it looks like asdf is preventing from the global sass to be execute and trying to run a sass related to a specific ruby version.

How can I run the global sass instead of the asdf sass?

Thank you so much if someone is willing to help me.

I have the same problem

Had similar issue with sass. Since brew init command usually gets added to ~/.zprofile (~/.bash_profile if using bash) and asdf one goes to ~/.zshrc (~/.bashrc), asdf shim directory will appear first in path, shadowing brew binaries.

You might want to move brew init line to ~/.zshrc (~/.bashrc) under asdf init or vice versa.