mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #23125 from Gaurav2728/update_puma_as_webserver
[ci skip] update guide for Puma web server instead of Webrick
This commit is contained in:
commit
71491c631f
4 changed files with 14 additions and 17 deletions
|
@ -995,10 +995,6 @@ you would like in a response object. The `ActionController::Live` module allows
|
|||
you to create a persistent connection with a browser. Using this module, you will
|
||||
be able to send arbitrary data to the browser at specific points in time.
|
||||
|
||||
NOTE: The default Rails server (WEBrick) is a buffering web server and does not
|
||||
support streaming. In order to use this feature, you'll need to use a non buffering
|
||||
server like [Puma](http://puma.io), [Rainbows](http://rainbows.bogomips.org)
|
||||
or [Passenger](https://www.phusionpassenger.com).
|
||||
|
||||
#### Incorporating Live Streaming
|
||||
|
||||
|
|
|
@ -55,20 +55,21 @@ Rails will set you up with what seems like a huge amount of stuff for such a tin
|
|||
|
||||
### `rails server`
|
||||
|
||||
The `rails server` command launches a small web server named WEBrick which comes bundled with Ruby. You'll use this any time you want to access your application through a web browser.
|
||||
The `rails server` command launches a web server named Puma which comes bundled with Rails. You'll use this any time you want to access your application through a web browser.
|
||||
|
||||
With no further work, `rails server` will run our new shiny Rails app:
|
||||
|
||||
```bash
|
||||
$ cd commandsapp
|
||||
$ bin/rails server
|
||||
=> Booting WEBrick
|
||||
=> Rails 5.0.0 application starting in development on http://localhost:3000
|
||||
=> Booting Puma
|
||||
=> Rails 5.0.0 application starting in development on http://0.0.0.0:3000
|
||||
=> Run `rails server -h` for more startup options
|
||||
=> Ctrl-C to shutdown server
|
||||
[2013-08-07 02:00:01] INFO WEBrick 1.3.1
|
||||
[2013-08-07 02:00:01] INFO ruby 2.2.2 (2015-06-27) [x86_64-darwin11.2.0]
|
||||
[2013-08-07 02:00:01] INFO WEBrick::HTTPServer#start: pid=69680 port=3000
|
||||
Puma 2.15.3 starting...
|
||||
* Min threads: 0, max threads: 16
|
||||
* Environment: development
|
||||
* Listening on tcp://localhost:3000
|
||||
```
|
||||
|
||||
With just three commands we whipped up a Rails server listening on port 3000. Go to your browser and open [http://localhost:3000](http://localhost:3000), you will see a basic Rails app running.
|
||||
|
@ -181,7 +182,7 @@ Fire up your server using `rails server`.
|
|||
|
||||
```bash
|
||||
$ bin/rails server
|
||||
=> Booting WEBrick...
|
||||
=> Booting Puma...
|
||||
```
|
||||
|
||||
The URL will be [http://localhost:3000/greetings/hello](http://localhost:3000/greetings/hello).
|
||||
|
|
|
@ -311,14 +311,14 @@ processing the entire request.
|
|||
For example:
|
||||
|
||||
```bash
|
||||
=> Booting WEBrick
|
||||
=> Booting Puma
|
||||
=> Rails 5.0.0 application starting in development on http://0.0.0.0:3000
|
||||
=> Run `rails server -h` for more startup options
|
||||
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
|
||||
=> Ctrl-C to shutdown server
|
||||
[2014-04-11 13:11:47] INFO WEBrick 1.3.1
|
||||
[2014-04-11 13:11:47] INFO ruby 2.2.2 (2015-04-13) [i686-linux]
|
||||
[2014-04-11 13:11:47] INFO WEBrick::HTTPServer#start: pid=6370 port=3000
|
||||
Puma 2.15.3 starting...
|
||||
* Min threads: 0, max threads: 16
|
||||
* Environment: development
|
||||
* Listening on tcp://localhost:3000
|
||||
|
||||
|
||||
Started GET "/" for 127.0.0.1 at 2014-04-11 13:11:48 +0200
|
||||
|
|
|
@ -208,7 +208,7 @@ commented line for new apps and you can uncomment if you need it.
|
|||
default to the `Gemfile` in apps generated under JRuby. You can investigate
|
||||
all the supported runtimes at [ExecJS](https://github.com/rails/execjs#readme).
|
||||
|
||||
This will fire up WEBrick, a web server distributed with Ruby by default. To see
|
||||
This will fire up Puma, a web server distributed with Rails by default. To see
|
||||
your application in action, open a browser window and navigate to
|
||||
<http://localhost:3000>. You should see the Rails default information page:
|
||||
|
||||
|
|
Loading…
Reference in a new issue