Soulou
Soulou

Reputation: 149

Load bundle dependencies from a global executable

Good evening,

I did a gem which contains executables which are called globally.

cd my_exec_gem
bundle install --deployment
gem build my_exec.gemspec
gem install my_exec-1.0.gem
my_exec <arguments>

My question is, what is the best way to execute my_exec with the version of the gems which have been installed in the my_exec_gem/vendor directory? How to adapt the gem path at the moment of the execution?

I want to keep the gems of the application isolated from the gems of the systen. (That's why there is --deployment)

Thank you!

Upvotes: 1

Views: 41

Answers (1)

Soulou
Soulou

Reputation: 149

The solution seems to be to use --binstubs to generate relative executables which change the ruby environment to run using the specified gems.

Upvotes: 1

Related Questions