I have a standard gem scaffold, and in inside the bin
directory I have a simple executable (bin/do_things.rb
):
#!/usr/bin/env ruby
require 'my_gem'
MyGem::doThings()
The gem hasn't been installed via gem install
, so running bin/do_things.rb
without bundle exec
fails (my Gemfile
has the gemspec
line in it).
Is there a simple way to have rubygems-bundler execute my script in the bundler context? Should I just modify the $LOAD_PATH
in my executable instead?
I could create a wrapper script to execute under Bundler as well, but I'd rather leverage rubygems-bundler somehow.
Or should I just type bundle exec
?