diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2013-06-14 01:14:56 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2013-06-14 01:14:56 +0530 |
commit | 41a398f859cc46430cb3b655d44c0cb3b41e42ae (patch) | |
tree | 1fefe6aa5560b49ca2142866080caaedaf2bf04d /guides/source/initialization.md | |
parent | 930d0e129c730292ab987eaaf1cd2ba8094e580b (diff) | |
parent | 2f0a5c7ac506b900d101620c4cc338a88ee620e3 (diff) | |
download | rails-41a398f859cc46430cb3b655d44c0cb3b41e42ae.tar.gz rails-41a398f859cc46430cb3b655d44c0cb3b41e42ae.tar.bz2 rails-41a398f859cc46430cb3b655d44c0cb3b41e42ae.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
guides/source/upgrading_ruby_on_rails.md
Diffstat (limited to 'guides/source/initialization.md')
-rw-r--r-- | guides/source/initialization.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/initialization.md b/guides/source/initialization.md index 9fcd530183..738591659d 100644 --- a/guides/source/initialization.md +++ b/guides/source/initialization.md @@ -36,8 +36,8 @@ This file is as follows: ```ruby #!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' ``` @@ -373,7 +373,7 @@ The `options[:config]` value defaults to `config.ru` which contains this: ```ruby # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path('../config/environment', __FILE__) run <%= app_const %> ``` @@ -388,7 +388,7 @@ app = eval "Rack::Builder.new {( " + cfgfile + "\n )}.to_app", The `initialize` method of `Rack::Builder` will take the block here and execute it within an instance of `Rack::Builder`. This is where the majority of the initialization process of Rails happens. The `require` line for `config/environment.rb` in `config.ru` is the first to run: ```ruby -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path('../config/environment', __FILE__) ``` ### `config/environment.rb` @@ -546,7 +546,7 @@ def self.run(app, options={}) else server.register('/', Rack::Handler::Mongrel.new(app)) end - yield server if block_given? + yield server if block_given? server.run.join end ``` |