Rails 3 with Mongrel possible?

After much fiddling and googling, it seems to me that Mongrel, even the
1.2.0pre2 release is not compatible with Rails 3 -- is that true?

When I start up a new Rails 3 project (i.e. one fresh after a
`rails new` command), mongrel appears to start (creates a pid file, and
reports no errors on the CLI), but the app does not load in the browser
and I find this in the mongrel.log

/gems/ruby-1.8.7-p302/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)

The most relevant info I could find is this, which seems to suggest that
mongrel is stuck in an abandoned, buggy state relative to Rails 3
(unless I misinterpreted the conversation).

http://github.com/fauna/mongrel/issues#issue/2

Is mongrel even being maintained anymore?

I am running mongrel 1.1.5 with Rails 3 and have no problems. It is
working nicely.

Regards,

Fidel.

Rails3 runs fine with mongrel 1.2.0pre2 if you include the mongrel gem
in your Gemfile:

gem 'mongrel', '1.2.0.pre2'

and you launch via

rails server

However mongrel doesn't appear to be able to run as a daemon in Rails3
because of changes in the dispatcher. So the old

mongrel_rails start -d

doesn't work. No clue if this is something someone will fix. Hope so,
since this appears to impact whether one can deploy a stack using
nginx/mongrel clusters with Rails3.

Stan Kaufman wrote:

Rails3 runs fine with mongrel 1.2.0pre2 if you include the mongrel gem
in your Gemfile:

gem 'mongrel', '1.2.0.pre2'

and you launch via

rails server

However mongrel doesn't appear to be able to run as a daemon in Rails3
because of changes in the dispatcher. So the old

mongrel_rails start -d

doesn't work. No clue if this is something someone will fix. Hope so,
since this appears to impact whether one can deploy a stack using
nginx/mongrel clusters with Rails3.

...but you'd almost always want to use Passenger instead.

Best,

...but you'd almost always want to use Passenger instead.

I've had several problems with Passenger in the past, and never been
able to get any answers about them, so it makes me rather hesitant to
try to use it again. Bad taste, first impressions and all that... but I
suppose there's no alternative.

Stan Kaufman wrote:

However mongrel doesn't appear to be able to run as a daemon in Rails3
because of changes in the dispatcher. So the old

mongrel_rails start -d

doesn't work. No clue if this is something someone will fix. Hope so,
since this appears to impact whether one can deploy a stack using
nginx/mongrel clusters with Rails3.

Well, that would be the issue I am seeing then (-d) as my interest in
using mongrel even for dev is eliminating the need for an open console
window. I tend to have several local rails app running, and console
windows all over is a drag.

Passenger 3 beta 1 has been released today. It may solve many, perhaps
all, of your problems seeing that we've worked hard on stability and
robustness. You can read about what we've done in Technology Preview 2
of our blog.

Greg Willits wrote:

...but you'd almost always want to use Passenger instead.

I've had several problems with Passenger in the past, and never been
able to get any answers about them, so it makes me rather hesitant to
try to use it again. Bad taste, first impressions and all that... but I
suppose there's no alternative.

Passenger has always worked perfectly for me. No hesitation is
necessary. It's the best Rails deployment solution I'm aware of, and
it's very widely used. Clustered Mongrels are torture to set up (yes,
I've done it -- never again without a specific reason).

Perhaps if you were to ask your questions instead of spreading FUD, you
could get help.

Best,

Greg Willits wrote:

Stan Kaufman wrote:

However mongrel doesn't appear to be able to run as a daemon in Rails3
because of changes in the dispatcher. So the old

mongrel_rails start -d

doesn't work. No clue if this is something someone will fix. Hope so,
since this appears to impact whether one can deploy a stack using
nginx/mongrel clusters with Rails3.

Well, that would be the issue I am seeing then (-d) as my interest in
using mongrel even for dev is eliminating the need for an open console
window. I tend to have several local rails app running, and console
windows all over is a drag.

So use a tabbed terminal. Running in daemon mode for dev is a bad idea
IMHO.

Best,

You can use iTerm on OS X and GNOME Terminal or Konsole on Linux. They
both support tabs. On the Windows side I recommend this:
http://sourceforge.net/projects/console/

Hongli Lai wrote:

I've had several problems with Passenger in the past, and never been
able to get any answers about them, so it makes me rather hesitant to
try to use it again. Bad taste, first impressions and all that... but I
suppose there's no alternative.

Passenger 3 beta 1 has been released today. It may solve many, perhaps
all, of your problems seeing that we've worked hard on stability and
robustness. You can read about what we've done in Technology Preview 2
of our blog.

Hongli, I'll try it, but for the record (and for those afraid of
fud-mongering), here's the details of the problems I had...

These are very old now, and probably don't apply to the new versions of
everything involved (Passenger, Ruby, Rails), but they're the problems I
faced, and never did get answers for. I was never able to use Passenger
because of them, and it made me leary of ever using it because I still
use the same application code that Passenger would not work with back
then. I don't expect answers to these now--don't waste your time on
it--I'm just pointing them out.

http://groups.google.com/group/phusion-passenger/browse_thread/thread/bc2d158fd72dbff9/47d5771780d23d31?lnk=gst&q=gw#47d5771780d23d31

http://groups.google.com/group/phusion-passenger/browse_thread/thread/ee197bc023329ca2/de50123cbc57fa92?lnk=gst&q=gw#de50123cbc57fa92

Here's hoping the third time is the charm...

-- gw

The Mac OS X Terminal.app also supports tabs.

Hongli Lai wrote:

You can use iTerm on OS X and GNOME Terminal or Konsole on Linux. They
both support tabs.

As does Apple's Terminal.app since Leopard.

On the Windows side I recommend this:
http://sourceforge.net/projects/console/

Best,

Greg Willits wrote:

Is mongrel even being maintained anymore?

Not exactly. But Mongrel 2 is coming along: http://mongrel2.org/home

Alternatively, if you don't want Passenger running locally or don't like
it try:

Unicorn is pure Ruby and works perfectly with Rails3 -
http://github.com/defunkt/unicorn
Thin is always an option too - http://code.macournoyer.com/thin/

Parker Selbert wrote:

Alternatively, if you don't want Passenger running locally or don't like
it try:

And as of very recently if you want a local Passenger that works much
like Mongrel then:

gem install passenger --pre
cd your_project
passenger start

This will install and setup Phusion Passenger Standalone the first time.
Then just do 'passenger start' in place of 'rails server'.

This is what I'm now using for development and am very happy with it so
far.

Robert Walker wrote:

Parker Selbert wrote:

Alternatively, if you don't want Passenger running locally or don't like
it try:

And as of very recently if you want a local Passenger that works much
like Mongrel then:

gem install passenger --pre
cd your_project
passenger start

This will install and setup Phusion Passenger Standalone the first time.
Then just do 'passenger start' in place of 'rails server'.

This is what I'm now using for development and am very happy with it so
far.

Interesting. With Rails 2, I've always thought local Passenger was
silly, but if Mongrel doesn't work with Rails 3, then I'll try this when
I start working with Rails 3.

Best,

Looks like the Rails team thinks you should want to use Unicorn, as
its gem is included (commented out, but there) in the default Gemfile
that gets generated with any new Rails3 app...

Stan Kaufman wrote:

That said, Unicorn in development (and even in production) is really nice.

Best regards

Peter De Berdt

Greg Willits wrote:

After much fiddling and googling, it seems to me that Mongrel, even the
1.2.0pre2 release is not compatible with Rails 3 -- is that true?

Thanks everyone for the feedback on the mongrel alternatives.

-- gw