diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-05-22 08:48:46 -0700 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-05-22 08:48:46 -0700 |
commit | ba55dd59ece04aa11bdb305dddfe4e975de9177a (patch) | |
tree | a720b66fd49d85e2ac0af0bbd9e3b80dbef3d778 /guides | |
parent | 987a74da23b7ef28a9564f20a3bf87b26530fa2f (diff) | |
download | rails-ba55dd59ece04aa11bdb305dddfe4e975de9177a.tar.gz rails-ba55dd59ece04aa11bdb305dddfe4e975de9177a.tar.bz2 rails-ba55dd59ece04aa11bdb305dddfe4e975de9177a.zip |
[Guides] Change bundler section
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/initialization.textile | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/guides/source/initialization.textile b/guides/source/initialization.textile index a1420d3b6a..fdbee7b332 100644 --- a/guides/source/initialization.textile +++ b/guides/source/initialization.textile @@ -138,23 +138,23 @@ The +APP_PATH+ constant will be used later in +rails/commands+. The +config/boot h4. +config/boot.rb+ -+config/boot.rb+ contains this: ++config/boot.rb+ contains: <ruby> # Set up gems listed in the Gemfile. -gemfile = File.expand_path('../../Gemfile', __FILE__) -begin - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -rescue Bundler::GemNotFound => e - STDERR.puts e.message - STDERR.puts "Try running `bundle install`." - exit! -end if File.exist?(gemfile) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) </ruby> -In a standard Rails application, there's a +Gemfile+ which declares all dependencies of the application. +config/boot.rb+ sets +ENV["BUNDLE_GEMFILE"]+ to the location of this file, then requires Bundler and calls +Bundler.setup+ which adds the dependencies of the application (including all the Rails parts) to the load path, making them available for the application to load. The gems that a Rails 3.1 application depends on are as follows: +In a standard Rails application, there's a +Gemfile+ which declares all +dependencies of the application. +config/boot.rb+ sets ++ENV['BUNDLE_GEMFILE']+ to the location of this file. If the Gemfile +exists, +bundler/setup+ is then required. + +The gems that a Rails 4 application depends on are as follows: + +TODO: change these when the Rails 4 release is near. * abstract (1.0.0) * actionmailer (3.1.0.beta) |