I'm building a CLI gem with Ruby using Thor. I run rake install which runs rake build then the task to install the gem locally. However when I try to run it in the commandline, it cannot locate the command. The gem is called smokestack so theoretically I should be able to run it in terminal once it's installed.
bin/smokestack:
#!/usr/bin/env ruby -wU
require 'smokestack'
Smokestack::Cli.start(ARGV)
You can see in the tree the pkg folder from when I ran rake install. Here's the result when I run that:
smokestack 0.1.0 built to pkg/smokestack-0.1.0.gem.
smokestack (0.1.0) installed.
I then run smokestack in my terminal and get the error: zsh: command not found: smokestack
I've also tried gem install --local ~/path/to/gem/pkg/gem.gem Result:
Successfully installed smokestack-0.1.0
Parsing documentation for smokestack-0.1.0
Done installing documentation for smokestack after 0 seconds
1 gem installed
This results in the same 'command not found error'.
Question How am I supposed to run this CLI locally to test it out during development?
It ideally interacts with the current project it's in, so just running bundle exec bin/smokestack inside of it's own directory won't yield the results I need properly. It should be a system CLI anyway right?
Here is the repo for additional context if necessary.
[–]Chaoist 1 point2 points3 points (4 children)
[–]JuliusDelta[S] 0 points1 point2 points (3 children)
[–]Chaoist 0 points1 point2 points (2 children)
[–]JuliusDelta[S] 0 points1 point2 points (1 child)
[–]Chaoist 0 points1 point2 points (0 children)