How can I use gem install
to install multiple gems at the same time, while also specifying the versions I want?
Example:
gem install akami -v 1.2.0 --ignore-dependencies
gem install atomic -v 1.1.14 --ignore-dependencies
gem install aws-s3 -v 0.6.2 --ignore-dependencies
gem install backports -v 3.3.0 --ignore-dependencies
gem install brendanlim-sms-fu -v 1.0.0 --ignore-dependencies
gem install builder -v 3.1.3 --ignore-dependencies
gem install capistrano -v 2.9.0 --ignore-dependencies
How could I instruct gem install
to execute that in one line?
The accepted answer do answer the question. But the final approach I took was to use bundler 1.0.22, which is compatible with ruby 1.8.6.
There are several ways to specify gem versions: Use a specific version: gem "name-of-gem", "1.0" . You can find specific versions on Rubygems.org (provided that's the source you”re using) by searching for your gem and looking at the “Versions” listed. Use a version operator: gem "name-of-gem", ">1.0" .
The install command installs local or remote gem into a gem repository. For gems with executables ruby installs a wrapper file into the executable directory by default. This can be overridden with the –no-wrappers option.
In deployment, isolation is a more important default. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them. As a result, bundle install --deployment installs gems to the vendor/bundle directory in the application.
Listing Installed Gems The list command shows your locally installed gems: $ gem list *** LOCAL GEMS *** abbrev (default: 0.1. 0) awesome_print (1.9. 2) base64 (default: 0.1.
Since Rubygems 2.0 you can specify a version for multiple package installations like this:
$ gem install akami:1.2.0 atomic:1.1.14 aws-s3:0.6.2 backports:3.3.0 \
brendanlim-sms-fu:1.0.0 builder:3.1.3 capistrano:2.9.0 \
--ignore-dependencies
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With