In my gem's gemspec, I specify a dependency of another gem (anothergem
) with an explicit version, say 1.12.2
. If the system already has anothergem
version 1.12.1
, my gem's executable will require
the wrong version. So,
How can I ensure my gem's executable loads the intended version of the gem's dependencies?
To be clear, the executable (mygemexec
) should be able to be called from anywhere without the need of bundle exec
. Example:
gem install mygem
mygemexec
EDIT: The way I am setting the dependency version in the gemspec is:
spec.add_dependency 'anothergem', '1.12.2'