Reputation: 510
For my code, I wanted to install the gem dependencies manually. How can I come to know the exact version required to be for the specific dependency? (Also note, I would not be accessing rubygems.org, everything is in my local)
pack = Gem::Package.new("<.gem-file-path>")
rd = pack.spec.runtime_dependencies
With dependency requirements being for e.g. '>= x' or different, How do I determine what is the exact version required for specific dependency?
Upvotes: 0
Views: 163
Reputation: 326
Gems that, for example, ">= 1.0 " mean all versions higher or equal to 1.0 is OK to be a dependency. So gem file may not tell you the exact version, however you can use bunlder to generate the Gemfile.lock which contains all the exact-valid gems you need. In this way, all you need is some effort to parse a Gemfile.lock file.
Upvotes: 1