About Bundler

Environment


1. What is Bundler?

Bundler is mechanism which can install package written on gemfile.


2. Upgrade gem

% sudo gem update --system


3. Install Bundler

% sudo gem install bundler
Password:
Fetching: bundler-1.10.4.gem (100%)
Successfully installed bundler-1.10.4
Parsing documentation for bundler-1.10.4
Installing ri documentation for bundler-1.10.4
1 gem installed


% bundle -v
Bundler version 1.10.4


4. Create Gemfile

% bundle init

This command create Gemfile which can install gem.


5. Install and update gem

% vi Gemfile


Example below...

# A sample Gemfile
source "https://rubygems.org"

# gem "rails"
gem "selenium-webdriver"
gem "capybara"
gem "rspec"
gem "pry-byebug"


Install gem which written on gemfile by below command.

% bundle install