# Controlando suas dependências de command line tools no ruby Nesse post gostaria de compartilhar sobre um projeto bem interessante. Quando vi essa gem, achei bem interessante... Se todo mundo usasse teríamos mensagens mais claras que qual lib que está faltando para rodar a gem... Exemplo? O **poltergeist** (que é a gem para executar ) obviamente depende do **phantom.js**. Mas quando você instala ele e não tem phantom instalado, ocorre uma mensagem bem pouco diagnosticável. Com essa gem os nossos problemas acabaram! O projeto é este: [https://github.com/yaauie/cliver](https://github.com/yaauie/cliver). Segundo a própria documentação, é bem fácil usar: ```ruby # no version requirements Cliver.detect('subl') # => '/Users/yaauie/.bin/subl' # one version requirement Cliver.detect('bzip2', '~> 1.0.6') # => '/usr/bin/bzip2' # many version requirements Cliver.detect('racc', '>= 1.0', '< 1.4.9') # => '/Users/yaauie/.rbenv/versions/1.9.3-p194/bin/racc' # dependency not met Cliver.detect('racc', '~> 10.4.9') # => nil # detect! raises Cliver::Dependency::NotMet exceptions when the dependency # cannot be met. Cliver.detect!('ruby', '1.8.5') # Cliver::Dependency::VersionMismatch # Could not find an executable ruby that matched the # requirements '1.8.5'. Found versions were {'/usr/bin/ruby'=> '1.8.7'} Cliver.detect!('asdfasdf') # Cliver::Dependency::NotFound # Could not find an executable asdfasdf on your path ``` Espero que seja útil.