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).
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.
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.
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.
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.
…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.
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.
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.
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.
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…
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…
Or they were just trying to provide examples for several common choices.
On 16 Sep 2010, at 20:18, Marnen Laibow-Koser wrote:
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…
Or they were just trying to provide examples for several common
choices.
That said, Unicorn in development (and even in production) is really
nice.
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.