gem equivalent of `pip install -r requirements.txt`

Tag: gem Author: demi_tq Date: 2012-07-22

I made similar question for npm here: npm equivalent of `pip install -r requirements.txt`

This is for gem.

What are the gem equivalent of:

pip freeze > requirements.txt
pip install -r requirements.txt

Best Answer

There isn't a direct comparison in Ruby, but we have something very similar. Look at the bundler gem for how to write your list of required gems into a Gemfile and automatically generate a Gemfile.lock which contains the current versions installed.