How to install several ruby ​​stones at once?

Is it possible to install more than one gem at a time with just one command?

+8
ruby install rubygems
source share
3 answers

The gem install command accepts a lot of parameters, so you can gem install nokogiri bundler take one snapshot, for example.

As others have said, Bundler and RVM does everything related to managing gems, versions and dependencies, is a real pleasure.

+18
source share

You can put them in a Gemfile and use bundler ( bundle install ).

Alternatively, you can specify the commands in the file:

 gem install pg gem install sqlite3 

and use something like cat <filename> | xargs sudo cat <filename> | xargs sudo to execute them.

** Consider using RVM to manage your gems in a gemset, rather than installing them globally with sudo.

+4
source share

You can use bundler: http://gembundler.com/

0
source share

All Articles