From f44a0b1d524064a2e919cd10d3013db680af9b17 Mon Sep 17 00:00:00 2001 From: RomD Date: Sat, 6 Feb 2010 17:18:10 +0100 Subject: fix usage examples and more to use new invocations Signed-off-by: Carl Lerche --- railties/guides/source/rails_on_rack.textile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'railties/guides/source/rails_on_rack.textile') diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/source/rails_on_rack.textile index df93580e89..eef44d9ec9 100644 --- a/railties/guides/source/rails_on_rack.textile +++ b/railties/guides/source/rails_on_rack.textile @@ -30,11 +30,11 @@ h4. Rails Application's Rack Object ActionController::Dispatcher.new is the primary Rack application object of a Rails application. Any Rack compliant web server should be using +ActionController::Dispatcher.new+ object to serve a Rails application.

-h4. +script/server+ +h4. +rails server+ -script/server does the basic job of creating a +Rack::Builder+ object and starting the webserver. This is Rails' equivalent of Rack's +rackup+ script. +rails server does the basic job of creating a +Rack::Builder+ object and starting the webserver. This is Rails' equivalent of Rack's +rackup+ script. -Here's how +script/server+ creates an instance of +Rack::Builder+ +Here's how +rails server+ creates an instance of +Rack::Builder+ app = Rack::Builder.new { @@ -54,7 +54,7 @@ Middlewares used in the code above are primarily useful only in the development h4. +rackup+ -To use +rackup+ instead of Rails' +script/server+, you can put the following inside +config.ru+ of your Rails application's root directory: +To use +rackup+ instead of Rails' +rails server+, you can put the following inside +config.ru+ of your Rails application's root directory: # RAILS_ROOT/config.ru @@ -233,7 +233,7 @@ h4. Generating a Metal Application Rails provides a generator called +metal+ for creating a new Metal application: -$ script/generate metal poller +$ rails generate metal poller This generates +poller.rb+ in the +app/metal+ directory: -- cgit v1.2.3