Closed tylerandrewscott closed 1 year ago
The gem which
command lists files that you can require. So in your case, require 'anystyle'
will resolve to the file /usr/local/lib/ruby/gems/3.2.0/gems/anystyle-1.4.0/lib/anystyle.rb
-- which looks fine. There is no anystyle-cli
module to load the fact that gem which
doesn't find any looks good as well.
Rather, the anystyle-cli
includes the anystyle
CLI tool. If you run which anystyle
this should hopefully point to usr/local/lib/ruby/gems/3.2.0/bin/anystyle
or something like that.
Ah that makes sense, thank you for explaining it to me.
I apologize if I am missing something obvious here -- I have previously used anystyle + anystyle-cli, but having updated to the new versions I cannot get anystyle-cli to work. It successfully installed using > gem install anystyle-cli, and shows up like I would expect when calling > gem list, but does not show up if I call >gem which anystyle-cli and the "sh: anystyle: command not found" message when trying to actually use the CLI tool. Anystyle does work interactively in ruby. I know that often this sort of thing ends up being a path issue, but I'm confused in this case because the anystyle-cli gem shows up where I expect, alongside anystyle, but one is found and the other is not.