In Rails, bundler provides a constant environment for Ruby projects by tracking and installing suitable gems that are needed. It manages an application’s dependencies through its entire life, across many machines, systematically and repeatably.
To use bundler, you need to install it.
gem install bundler
The gem bundler bundles all the suitable gems your appication is based upon. Bundling Rails and other dependencies increases slug size by a few megabytes. Increased slug size is a worthwhile tradeoff for simplified dependency management, as well as flexibility of being able to use any version of Rails you wish.
To not install a group of gems, use the BUNDLE_WITHOUT config var.
Bundler Version
Different versions of bundler have different bugs and behavior. Bundler versions generally take a large amount of verification and Validation and are released infrequently. It needs maximum stability, avoids deprecation and notification cycles on Bundler as it changes.
Bundler Version Issues
Different bundler versions have different bugs.
Bundler 1.13.6
If you are using an older version of bundler, it allows you to have a version of Ruby in your Gemfile.lock file. It is not valid according to the Ruby declaration in your Gemfile.
You will get the following error:
Your Ruby version is 2.2.5, but your Gemfile specified 2.3.1
You need to upgrade to latest bundler.
Bundler 1.13.1
You will get the following error:
- Bundler Output: requires_greater_than_equal_ruby_two_two-0.1.0 requires ruby version >= 2.2.2, which
- is incompatible with the current version, ruby 2.1.7p400
You need to upgrade your Ruby version to be compatible with minimum Ruby version specified in your gems.
Leave a Reply