Bundler.setup

Configure the load path so all dependencies in your Gemfile can be required
require 'rubygems'
require 'bundler/setup'
require 'nokogiri'
Only add gems from specified groups to the load path. If you want the gems in the default group, make sure to include it
require 'rubygems'
require 'bundler'
Bundler.setup(:default, :ci)
require 'nokogiri'
Learn More: Groups
Fork me on GitHub
Docs: Previous Version (v1.10) Current Version (v1.11)