WEBrick is a built-in Rails server that can be used to serve Rails apps without configuring Apache. It is intended for development use, although some use it for intranet use as well.

h3. Starting WEBrick 

WEBrick is delivered as a script inside 'script' in the app folder. It can be started from inside your app directory with default settings

<pre><code>
ruby script/server {--help  #display usage information}
</code></pre>

Defaults:
* Port: 3000
* IP: 0.0.0.0
* Environment: development

Options:
* - p, - - port=port<br>Runs Rails on the specified port.
* - b, - - binding=ip<br>Binds Rails to the specified ip.
* - e, - - environment=name<br>Specifies the environment to run this server under (test/development/production).
* - d, - - daemon<br>Make Rails run as a Daemon (only works if fork is available -- meaning on *nix).
* - h, - - help<br>Shows help message.

h3. Stopping WEBrick

To stop the WEBrick server on a *nix system, you need to kill the process. This requires two steps.

*Step 1* - Find PID

<pre><code>
ps auxww | grep script/server
</code></pre>
You are looking for the number in the second column (on most *nix systems).

*Step 2* - Kill Process

<pre><code>
kill -15 xxxxx
</pre></code>
Where _xxxxx_ is the pid you found from the previous command. Depending on the user running the server, you may have to be superuser.
