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: v0.9 v1.0 v1.1 v1.2 v1.3 v1.5 v1.6