Check whether specified libraries, binaries, gems is installed in system
I am writing some deployment modules in Ruby.
Before Deploying m开发者_开发百科y custom packages or programs I need to check whether dependent libraries is installed or not.
Is there any ruby libraries for checking the existence of packages/gems/libraries.
Please help..
Rubygems can check and install gem's dependencies, just list them in your .gemspec file:
When installing a gem with gem install …, its dependencies will be checked. If they are not installed, gem will offer to install them.
(from http://docs.rubygems.org/read/chapter/20#dependencies)
A common solution to this problem is to use Bundler. I use it and like it a lot, it's also the default way to manage dependencies for Ruby on Rails applications these days. "Bundler manages an application's dependencies through its entire life across many machines systematically and repeatably."
It's very easy to use and is highly configurable. You can install gems, or pull from various types of repositories.
http://gembundler.com/
精彩评论