-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I think codelog deserves to be used as a tool for any project requiring a changelog, not limited to Ruby projects.
It can be used like that right now, by just installing the gem, BUT, if you use something like RVM, that something could hide the installed codelog.
Expected Behavior
After install it at the system level, it will just work.
I imagine it will be installable by the system package manager, but let's use the gem installed by the system (which is what any package manager will do anyways):
$ sudo /usr/bin/gem install codelog
$ codelog # prints the help
Adapt the idea to your system (yum, brew, etc.).
Current Behavior
The closest to that expected behaviour is using gem at the system level.
BUT, suppose we have RVM, and it defines a default other than the system ruby. Then to install it at the system level:
$ sudo /usr/bin/gem install codelog
$ codelog
Traceback (most recent call last):
2: from /usr/local/bin/codelog:23:in `<main>'
1: from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem codelog (>= 0.a) with executable codelog (Gem::GemNotFoundException)
You can see it fails because it can't find the gem.
But if we switch to the "System" Ruby:
$ rvm use system
$ codelog # printes the help, it works
It works.
Possible Solution
Not IDEA how to solve this, but to sumarize:
How could we make codelog installable in a way that it is installed like let's say ls or cd or find, etc, so it doesn't matter what Ruby is active, it still will work?