From 2161434d1671edac32ef06bf35cc8fe4c905a7db Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 4 Jan 2013 05:14:24 +0900 Subject: update the scaffold generator outputs --- guides/source/command_line.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guides/source/command_line.md') diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 746226fa96..26bc08032a 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -225,7 +225,8 @@ $ rails generate scaffold HighScore game:string score:integer invoke test_unit create test/models/high_score_test.rb create test/fixtures/high_scores.yml - route resources :high_scores + invoke resource_route + route resources :high_scores invoke scaffold_controller create app/controllers/high_scores_controller.rb invoke erb -- cgit v1.2.3 From 40c3d80296763aed4df3b918ace39312fd0a1bd9 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 4 Jan 2013 14:24:46 +0900 Subject: update the example of generated postgresql config --- guides/source/command_line.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'guides/source/command_line.md') diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 26bc08032a..a23e5011be 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -564,14 +564,20 @@ We had to create the **gitapp** directory and initialize an empty git repository $ cat config/database.yml # PostgreSQL. Versions 8.2 and up are supported. # -# Install the ruby-postgres driver: -# gem install ruby-postgres -# On Mac OS X: -# gem install ruby-postgres -- --include=/usr/local/pgsql +# Install the pg driver: +# gem install pg +# On OS X with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On OS X with MacPorts: +# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config # On Windows: -# gem install ruby-postgres +# gem install pg # Choose the win32 build. # Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem 'pg' +# development: adapter: postgresql encoding: unicode -- cgit v1.2.3 From ffaad630e2166cd77ff4761f1e3d1b555beb9ee5 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 4 Jan 2013 14:40:21 +0900 Subject: get rid of outdated "`server` with Different Backends" section * I don't think people are running Rails under mongrel today * it's better not to sudo gem install * basically all we need to do is just bundle the server. No need to give its name as a parameter * I could write ^^^, but I realized that it's not really about "command line" --- guides/source/command_line.md | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'guides/source/command_line.md') diff --git a/guides/source/command_line.md b/guides/source/command_line.md index a23e5011be..fd9c2b474f 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -592,28 +592,3 @@ development: It also generated some lines in our database.yml configuration corresponding to our choice of PostgreSQL for database. NOTE. The only catch with using the SCM options is that you have to make your application's directory first, then initialize your SCM, then you can run the `rails new` command to generate the basis of your app. - -### `server` with Different Backends - -Many people have created a large number of different web servers in Ruby, and many of them can be used to run Rails. Since version 2.3, Rails uses Rack to serve its webpages, which means that any webserver that implements a Rack handler can be used. This includes WEBrick, Mongrel, Thin, and Phusion Passenger (to name a few!). - -NOTE: For more details on the Rack integration, see [Rails on Rack](rails_on_rack.html). - -To use a different server, just install its gem, then use its name for the first parameter to `rails server`: - -```bash -$ sudo gem install mongrel -Building native extensions. This could take a while... -Building native extensions. This could take a while... -Successfully installed gem_plugin-0.2.3 -Successfully installed fastthread-1.0.1 -Successfully installed cgi_multipart_eof_fix-2.5.0 -Successfully installed mongrel-1.1.5 -... -... -Installing RDoc documentation for mongrel-1.1.5... -$ rails server mongrel -=> Booting Mongrel (use 'rails server webrick' to force WEBrick) -=> Rails 3.1.0 application starting on http://0.0.0.0:3000 -... -``` -- cgit v1.2.3