Permalink
Browse files

update bundler example to use bundler/setup

Bundler.setup should be replaced with `require 'bundler/setup'` according
to the gembundler online documentation.
  • Loading branch information...
1 parent 586ebe2 commit 8904fb6111d69cf00aed6bf938d32d1543c0d13e elij committed Feb 25, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 development/bundler.md
View
@@ -96,12 +96,14 @@ Bundler provides two main ways to use your bundle in your application,
`Bundler.setup` and `Bundler.require`. `Setup` basically tells Ruby all
of your gems loadpaths, and `require` will load all of your specified gems.
+Requiring `bundler/setup` is the same as calling `Bundler.setup` yourself, and
+is the recommended method in the gembundler documentation.
+
# If you're using Ruby 1.9 you'll need to specifially load rubygems
require 'rubygems'
# and now load bundler with your dependencies load paths
- require 'bundler'
- Bundler.setup
+ require 'bundler/setup'
# next you'll have to do the gem requiring yourself
require 'sinatra'
@@ -110,8 +112,7 @@ of your gems loadpaths, and `require` will load all of your specified gems.
Now if say you skip the last step, and just auto require gems from your groups
require 'rubygems'
-
- require 'bundler'
+ require 'bundler/setup'
# this will require all the gems not specified to a given group (default)
# and gems specified in your test group

0 comments on commit 8904fb6

Please sign in to comment.