-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asdf does not seem to be picking up on ruby gem executables in the GEM_PATH #383
Comments
This seems to be the issue:
It looks like you have rspec-core installed in 3.2.0, but not in 3.2.1. Are you sure your project's |
Thank you for the quick reply. I thought similar at first, but it was brought to my attention that this expected behavior because 3.2 is the ABI version for 3.2.1? That seems logical to me, but I don't know how to verify that easily. Some other supporting evidence: I generated a binstub with bundler I only have one ruby installed
head of source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "~> 3.2.1"
No legacy |
One other item of note, this did seem to start after a brew update/upgrade and an associated ruby plugin update sadly I did not track the changes too closely but it was probably related to updating the ruby versions available so I could get the 3.3.0 releases and to ensure my statically linked libs were up to date to build the new ruby version. |
EDIT: there is a |
Right, I'm used to
This used 3.2.3 by default, so then I updated the
So, it sounds like something in your dev setup is putting the gem path
and the installation directory also points to asdf:
Here's what I would try: • Check your .zshrc, .zprofile, .zlogin for anything that might affect your PATH |
I should have specified that it's probably the GEM_PATH and/or GEM_HOME env vars that are possibly being set somewhere. You can check with |
I've run into the similar issue: binaries from gems installed from git repo in Gemfile do not work. Looks like an old issue #194, but I did not understand the solution from there. |
I've been using asdf for at least 4-5 years across languages and this is the first time I've experienced any unexpected behavior. While this report is specific to rspec, it has been observed for other bin executables like foreman.
version info:
asdf install via homebrew, zsh shell.
.zshrc hook
asdf info
scenario
I recently began observing that gems that should exist in the bundle are not resolving on the
$PATH
. As an example, I have a rails app that is currently running ruby 3.2.1. I followed the instructions from the asdf readme to fully remove and then reinstall asdf via homebrew, add the ruby plugin, and install ruby 3.2.1. I was able to cd into my rails app, and bundle the app successfully. Then, when running rspec within the context of the bundle, I received the following output:ruby options in env
the command does not appear in my path:
bundler info:
bundler shim:
identifying the bundler and gem exe paths:
spec runs when prefixing the whole path:
and there is also a bin exe that when fully pathed works just fine
temporary solution
If I globally install the gem to the ruby version, I get a shim for the executable that will work:
I was able to get to this temporary solution by groking enough of the reshim.sh in asdf to understand how it would work. The question is how the ruby asdf plugin should work in order to dynamically adjust the path to pick up on the bin executables, and if there has been something that has changed recently that would cause a change in this behavior for either this specific ruby version, the specific bundler version, or asdf as a whole, as I do not know where to target any further investigation.
Thanks in advance!
The text was updated successfully, but these errors were encountered: