xxamxx / vscode-rubygems

The is Rubygems Explorer, it can browser RubyGems source codes of your project by Gemfile.lock the extension
6 stars 2 forks source link

Use multiple names to find ruby in the PATH env var #8

Closed pedrogalan closed 9 months ago

pedrogalan commented 1 year ago

I use asdf to handle my Ruby installation, which means that I don't have anything including the word ruby in my PATH environment variable. This results in the extension failing with an error saying that bundle cannot be found.

asdf adds to the PATH environment variable the following path: /Users/pedrogalan/.asdf/shims. Here is where the ruby and bundle binaries live.

So, in order for the function ruby_paths() to be able to find the required binaries for those users using asdf, I have slightly modified the filter so that it looks, not only for the name ruby but also for others (e.g. shims and possibly others that might be added to the array in the future).

shawncamthom commented 1 year ago

I use asdf to handle my Ruby installation, which means that I don't have anything including the word ruby in my PATH environment variable. This results in the extension failing with an error saying that bundle cannot be found.

asdf adds to the PATH environment variable the following path: /Users/pedrogalan/.asdf/shims. Here is where the ruby and bundle binaries live.

So, in order for the function ruby_paths() to be able to find the required binaries for those users using asdf, I have slightly modified the filter so that it looks, not only for the name ruby but also for others (e.g. shims and possibly others that might be added to the array in the future).

Hello @pedrogalan, I see this solution has yet to be merged into the main branch. Is there a way that I can fix this issue locally in the meantime?

pedrogalan commented 1 year ago

Sorry, @LightintheBulb, I don't even remember what I did to fix it on my local. I dropped VS Code and moved to Nvim at the beginning of this year.

shawncamthom commented 1 year ago

Sorry, @LightintheBulb, I don't even remember what I did to fix it on my local. I dropped VS Code and moved to Nvim at the beginning of this year.

Oh okay, no problem. Thank you for responding; I appreciate it!

xxamxx commented 9 months ago

I really appreciate all you've done!