I am troubleshooting a certain gem (spree_cmd) and want to know where “bundle exec” expects the binaries to be.
...bundler/shared_helpers.rb:151:in `bin_path': can't find executable spree.
When I echo $PATH, there is a “spree” somewhere. Confirmed with which spree.
Without a clearer understanding of your issue, I can’t offer anything specific.
You can figure out where it is storing your binaries by doing
bundle exec which some_binary_from_gemfileit will tell you where that binary is located.According to the docs it also looks like you can add your own bin directory by setting the
$BUNDLE_BIN_PATHenvironment variable.Another thing you could do would be to
bundle install --binstubswhich would create a folder in the root directory containing all of your binaries.If your binary isn’t being added to the path, the first place I would look is your .gemspec, (you must specify where the bin directory is with
spec.bindir = 'bin'). I see in the current spree_cmd gem (0.0.4) that it looks correct (haven’t tried running it). If that looks correct, then make sure your binary is in the dir you specified, make sure it is executable, make sure the shebang is correct, make sure it’s named the same as the binary you’re trying to invoke.