Reputation: 5594
I'm developing a gem which should install an executable.
At the moment I have a file at bin/myexec
which does the work. I've got the line gem.executables = 'myexec'
in my gemspec, and when I build and install the gem I can do bundle exec myexec
anywhere and run my code - sweet.
I'm using rbenv, so I expect some slight shenanigans with binaries, but when I install this gem I need to always bundle exec myexec
and I can't just myexec
. I've poured over other gems (like guard
) to see if there's some quirk of the .gemspec which implies that a rbenv binstub should be created, but I can't see anything.
What am I doing wrong?
Thanks!
Upvotes: 1
Views: 572
Reputation: 1323
If you are using your gem in another project and you installed it using bundler you have to stick with bundle exec myexec
. To use your gem system wide you should install it using the gem
command and rbenv rehash
your environment.
I hope this helps, otherwise it would be nice if you provided some more information how you are using bundler etc.
Upvotes: 1