Reputation: 1160
How can I prevent gem install
to not reinstall a Gem if the same version is already installed?
Upvotes: 1
Views: 386
Reputation: 426
You can use the --conservative
flag with gem install.
gem install sqlite -v 1.3.8 --conservative
It won't install or update any gems that meet the version requirement.
Upvotes: 5
Reputation: 794
I would go with some bash oneliner:
if ! gem list | grep your_gem_name; then gem install your_gem_name; fi;
Upvotes: 0