| 30 | | 1. Run the WEBrick servlet: <tt>ruby script/server</tt> (run with --help for options) |
|---|
| 31 | | ...or if you have lighttpd installed: <tt>ruby script/lighttpd</tt> (it's faster) |
|---|
| 32 | | 2. Go to http://localhost:3000/ and get "Congratulations, you've put Ruby on Rails!" |
|---|
| 33 | | 3. Follow the guidelines on the "Congratulations, you've put Ruby on Rails!" screen |
|---|
| | 30 | 1. Start the web server: <tt>ruby script/server</tt> (run with --help for options) |
|---|
| | 31 | 2. Go to http://localhost:3000/ and get "Welcome aboard: Youâre riding the Rails!" |
|---|
| | 32 | 3. Follow the guidelines to start developing your application |
|---|
| | 34 | |
|---|
| | 35 | == Web servers |
|---|
| | 36 | |
|---|
| | 37 | Rails uses the built-in web server in Ruby called WEBrick by default, so you don't |
|---|
| | 38 | have to install or configure anything to play around. |
|---|
| | 39 | |
|---|
| | 40 | If you have lighttpd installed, though, it'll be used instead when running script/server. |
|---|
| | 41 | It's considerably faster than WEBrick and suited for production use, but requires additional |
|---|
| | 42 | installation and currently only works well on OS X/Unix (Windows users are encouraged |
|---|
| | 43 | to start with WEBrick). We recommend version 1.4.11 and higher. You can download it from |
|---|
| | 44 | http://www.lighttpd.net. |
|---|
| | 45 | |
|---|
| | 46 | If you want something that's halfway between WEBrick and lighttpd, we heartily recommend |
|---|
| | 47 | Mongrel. It's a Ruby-based web server with a C-component (so it requires compilation) that |
|---|
| | 48 | also works very well with Windows. See more at http://mongrel.rubyforge.org/. |
|---|
| | 49 | |
|---|
| | 50 | But of course its also possible to run Rails with the premiere open source web server Apache. |
|---|
| | 51 | To get decent performance, though, you'll need to install FastCGI. See |
|---|
| | 52 | http://wiki.rubyonrails.com/rails/pages/FastCGI for more information on FastCGI. |
|---|