Guest User

Untitled

a guest
Apr 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. if !gem_installed("some gem name")
  2. system "gem install -l local_copy.gem"
  3. end
  4.  
  5. begin
  6. gem "somegem"
  7. # with requirements
  8. gem "somegem", ">=2.0"
  9. rescue GEM::LoadError
  10. # not installed
  11. end
  12.  
  13. matches = Gem.source_index.find_name(gem.name, gem.version_requirements)
  14.  
  15. puts %x(#{cmd})
Add Comment
Please, Sign In to add comment