Bundler Documentation

website·Indexed 42 days ago

https://bundler.io

A tool that provides a consistent environment for Ruby projects by tracking and installing the exact gem dependencies required.

Tokens
183
Snippets
1
Records
2
Agent score
25%

What's inside Bundler

  1. Install Bundler

    Bundler is preinstalled by default in any modern distribution of Ruby. Ensure Ruby is installed on your system before attempting to use Bundler.
  2. Initialize a Ruby project with Bundler

    Bundler ensures a consistent environment across development, staging, and production by tracking exact gem versions. To get started, create a Gemfile in your project's root directory to specify your dependencies and their sources. Once the Gemfile is created, run bundle install to install the required gems. It is recommended to commit both the Gemfile and the resulting Gemfile.lock to your version control system.
    # Gemfile
    source 'https://rubygems.org'
    gem 'nokogiri'
    gem 'rack', '~> 2.2.4'
    gem 'rspec'
    $ bundle install
    $ git add Gemfile Gemfile.lock