diff options
Diffstat (limited to 'doc/site/src/docs')
-rw-r--r-- | doc/site/src/docs/howto.page | 12 | ||||
-rw-r--r-- | doc/site/src/docs/index.page | 33 | ||||
-rw-r--r-- | doc/site/src/docs/started.page | 94 | ||||
-rw-r--r-- | doc/site/src/docs/win32.page | 93 |
4 files changed, 232 insertions, 0 deletions
diff --git a/doc/site/src/docs/howto.page b/doc/site/src/docs/howto.page new file mode 100644 index 0000000..3802201 --- /dev/null +++ b/doc/site/src/docs/howto.page @@ -0,0 +1,12 @@ +--- +title: HOWTO +inMenu: true +directoryName: Documentation +--- + +h1. Mongrel HOWTO + +Coming soon... + + + diff --git a/doc/site/src/docs/index.page b/doc/site/src/docs/index.page new file mode 100644 index 0000000..eee9fe4 --- /dev/null +++ b/doc/site/src/docs/index.page @@ -0,0 +1,33 @@ +--- +title: Documentation +inMenu: true +directoryName: Documentation +--- + +h1. Available Documentation + +We've got a small set of documentation to get people going. Most of it is +geared toward Ruby on Rails but other projects using Mongrel should have their own +docs that you can refer to based on these. + +* "Getting Started":started.html -- Installing and Other things +* "HOWTO":howto.html -- Doing advanced stuff with Mongrel. +* "Win32 HOWTO":win32.html -- Specific instructions for running on windows. + +If there's documentation you'd like then feel free to e-mail the list or post +to the tracker. + +h2. RDoc API Documentation + +Check out the "RDoc":/rdoc/index.html documentation to get a look at the +API and dig into the source. Since Mongrel is currently being used by +other frameworks it's documentation is aimed at developers. Real manuals +will be written when there's something for "regular" folks to use. + + +h2. Frequently Asked Questions + +When people ask questions really frequently the results end up in the +"FAQ":faq.html or if they're funny they end up in the "FASQ":fasq.html +so everyone can have a laugh. + diff --git a/doc/site/src/docs/started.page b/doc/site/src/docs/started.page new file mode 100644 index 0000000..731254b --- /dev/null +++ b/doc/site/src/docs/started.page @@ -0,0 +1,94 @@ +--- +title: Getting Started +inMenu: true +directoryName: Documentation +--- + +h1. Getting Started + +The easiest way to get started with Mongrel is to install it via RubyGems +and then run a Ruby on Rails application. You can do this easily: + + $ sudo gem install mongrel + $ cd myrailsapp + $ mongrel_rails start -d + +Which runs Mongrel in the background. You can stop it with: + + $ mongrel_rails stop + +And you're all set. There's quite a few options you can set for the +start command. Use the *mongrel_rails start -h* to see them all. + + +h2. Win32 Install + +Windows has a slight difference since it seems that the win32-service doesn't +get picked up for some people as a dependency. You'll need to do this instead: + + $ gem install win32-service (pick the most recent one) + $ gem install mongrel (pick the win32 pre-built) + +Now you're installed. "Read the Win32 HOWTO for more instructions.":win32.html + + +h2. Updating + +You should be able to do an *gem update* and get the latest version of Mongrel +on any platform you've already installed it on. The caveat to this is if +you've been grabbing test releases from any of the authors directly then +you'll need to *gem uninstall* first to make sure you don't have any buggy +stuff lying around. + + +h1. Help For Commands + +Mongrel uses a fairly comprehensive command/plugin system (documented in the near +future) that has built-in help thanks to optparse. Just pass a -h to any +command and it will dump the help for you: + + $ mongrel_rails start -h + Usage: start [options] + -e, --environment ENV Rails environment to run as + -d, --daemonize Whether to run in the background or not + -p, --port PORT Which port to bind to + -a, --address ADDR Address to bind to + -l, --log FILE Where to write log messages + -P, --pid FILE Where to write the PID + -n, --num-procs INT Number of processor threads to use + -t, --timeout SECONDS Timeout all requests after SECONDS time + -m, --mime PATH A YAML file that lists additional MIME types + -c, --chdir PATH Change to dir before starting (will be expanded) + -r, --root PATH Set the document root (default 'public') + -h, --help Show this message + --version Show version + +Also every option has reasonable default options, and will complain if you give +anything invalid. + + +h1. Running In Development + +Mongrel turns out to be really nice for development since it serves files +much faster than WEBrick. I'm using it for almost all my development Ruby +on Rails work these days. What I do is the following: + + $ mongrel_rails start + +And then do my work like normal with WEBrick. You don't get all the logging +and stuff you get with WEBrick (planned for a future release) but otherwise +it's nice and snappy. + + +h1. More Information + +There's a "mailing list":http://rubyforge.org/mailman/listinfo/mongrel-users that +you should subscribe to if you're looking for help or are interested in tracking +Mongrel. We post announcements of pre-release gems you can play with to this +mailing list and also discuss development of Mongrel there. + +Before you start asking for features you should read about +"bikeshedding":http://www.catb.org/jargon/html/B/bikeshedding.html and +understand that we're really nice, but sometimes code speaks better than rhetoric. + +Finally there's lots of other "documentation.":index.html
\ No newline at end of file diff --git a/doc/site/src/docs/win32.page b/doc/site/src/docs/win32.page new file mode 100644 index 0000000..4a97a16 --- /dev/null +++ b/doc/site/src/docs/win32.page @@ -0,0 +1,93 @@ +--- +title: Win32 HOWTO +inMenu: true +directoryName: Documentation +--- + +h1. Mongrel Win32 HOWTO + +Mongrel now supports Win32 much better than previous releases thanks to +some "great people":../attributions.html and their hard work. You can +now run Mongrel with Ruby on Rails as a windows service, ang there are +pre-compiled gems available for people to use. + +*Before reading this document you need to read "Getting Started.":started.html and make sure it works.* + +h2. Stopping The mongrel_rails Script + +When you run the mongrel_rails script from the command line you'll have to use CTRL-Pause/Break +to get it to exit rather than CTRL-C. + + +h2. Running The Service + +After you do the gem install, find a Rails application you want to run +and do: + + $ mongrel_rails_service install -n myapp \ + -r c:\my\path\to\myapp -p 4000 -e production + $ mongrel_rails_service start -n myapp + +Now hit the port and poof, works (or should). + +*Stopping the service is a little problematic right now.* We're working on graceful +shutdown, so be patient. The application will stop if you use: + + $ mongrel_rails_service stop -n myapp + +But will complain about an error during shutdown. If you try to stop using the +Services control panel then it will seem to hang. Just wait a little while then +hit stop once the service actually stop. + + +h2. Development Work + +I recommend that you keep the service runner for doing a production run setup, +and then use a regular console with the plain Mongrel runner until we get +service stop working right. + +Also, if you run into an app that's not running right, my suggestion is to run it with +the regular mongrel_rails runner: + + $ cd c:\my\path\to\myapp + $ mongrel_rails start -p 4500 + +Since that will spit out error messages and stuff to the console. *Use CTRL-Pause/Break to stop.* + + +h2. Other Service Commands + +There is a full set of service control commands in the mongrel_rails_service script. +This lets you use either the Services control panel or a command line script to +manage your Rails applications. What's also nice is that you can register as many +applications as you want, and even the same one with different names. + + +h3. install + +If you want to run the same app in different modes then use the *-n* option to the *install* +command: + + $ mongrel_rails_service install -n myapp_dev \ + -r c:\my\path\to\myapp -p 4000 -e development + $ mongrel_rails_service start -n myapp + +You can also use the *-d* option to give the service a different display name in the +Services console. + +h3. start + +Pretty much just takes a service name to start up. It will run and print a message +until the service finally starts, which sometimes can take 10-60 seconds. + +h3. stop + +Sort of works right now and also only takes a -n parameter. It has a few errors +when it tries to stop a service so we're working on making it cleaner. + +h3. delete + +Takes the name (-n) of the service to delete and then removes it from the list. +*This would be how you'd remove a service so you can change it's start-up options.* + + |