[Mongrel] Getting Started without Rails

Chris Farmiloe chris at oxdi.eu
Wed Mar 14 07:44:14 EDT 2007

Hey Michel:

$ mongrel_rails start

is a command specifically for launching rails apps.

if you want to use mongrel as the server for your own framework/ 
application, then take a quick look at the example (examples/ 


using mongrel for your ruby apps is a slightly different approch if  
your used to cgi-gateways ... but it is infinitely more flexible,  
since you have Ruby-based control over the whole request/response  

write yourself a little Handler class to take the request -> call  
your methods -> modify the response.

I think there is a short mongrel book on O'Reily safari online if you  
have an account.

Otherwise, the examples in the source are very helpful .... checkout  
how the Camping framework uses mongrel (as this is quite simple).

I am assuming here that by non-rails...you still meen a Ruby app ...  
I've yet to see anyone launching a PHP app via mongrel :)


Chris Farmiloe
Design & Development

Brighton, BN2 1ED

+44 1273 608708

On 13 Mar 2007, at 23:36, Michel Vaillancourt wrote:

> 	Hi, everyone.  I am in the process of learning Ruby.  I've  
> concluded that there are couple of quirks with mod_ruby that are  
> limiting me a fair bit, so I'm looking for an alternative.  From  
> what I've read, Mongrel is The Answer.  However, this has left me  
> with a few questions.
> 	I'm looking for some help getting a non-rails Mongrel started...   
> I can't seem to find the docs I need in my web searching...   
> specifically need something that explains what files Mongrel  
> expects to see where for a non-rails app to work.  Everything I  
> have found is written on the premise of Mongrel with Rails (eg,  
> http://mongrel.rubyforge.org/rdoc/index.html).
> ext2:/home/www/ruby/cosmogenesis# mongrel_rails start
> ** Starting Mongrel listening at
> ** Starting Rails with development environment...
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in  
> `gem_original_require': no such file to load -- /home/www/ruby/ 
> cosmogenesis/config/environment (LoadError)
>         from /usr/local/lib/site_ruby/1.8/rubygems/ 
> custom_require.rb:27:in `require'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> rails.rb:155:in `rails'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ 
> mongrel_rails:112:in `cloaker_'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> configurator.rb:138:in `call'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> configurator.rb:138:in `listener'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ 
> mongrel_rails:98:in `cloaker_'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> configurator.rb:51:in `call'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> configurator.rb:51:in `initialize'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ 
> mongrel_rails:83:in `new'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ 
> mongrel_rails:83:in `run'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 
> command.rb:211:in `run'
>         from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ 
> mongrel_rails:243
>         from /usr/bin/mongrel_rails:16:in `load'
>         from /usr/bin/mongrel_rails:16
> 	... its pretty obvious that Mongrel is expecting to find some key  
> files with Important Stuff in them, but I can't seem to find info  
> on where/what.  Can someone point me at a how-to or docs that  
> explain what files are needed with what contents?
> 	Thanks in advance for any and all help.
> 	--Michel
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070314/b951bfe4/attachment-0001.html 

More information about the Mongrel-users mailing list