Here is the RubyGems guide for how to add an executable.
The primary steps are:
chmod a+x bin/<yourfile>
.executablessection of your gemspec
Note you will still have to build and install your gem locally to run the command without a path as you are trying to do in the screenshot.
More info in building executable gems.