Rails 3 with Mongrel possible?

197 views
Skip to first unread message

Greg Willits

unread,
Sep 15, 2010, 12:03:49 AM9/15/10
to rubyonra...@googlegroups.com
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?
--
Posted via http://www.ruby-forum.com/.

Fidel Viegas

unread,
Sep 15, 2010, 4:19:16 AM9/15/10
to rubyonra...@googlegroups.com
I am running mongrel 1.1.5 with Rails 3 and have no problems. It is
working nicely.

Regards,

Fidel.

> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

Stan Kaufman

unread,
Sep 15, 2010, 12:16:47 PM9/15/10
to Ruby on Rails: Talk
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.

Marnen Laibow-Koser

unread,
Sep 15, 2010, 1:38:04 PM9/15/10
to rubyonra...@googlegroups.com

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

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Greg Willits

unread,
Sep 15, 2010, 2:30:37 PM9/15/10
to rubyonra...@googlegroups.com
> ...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.

Greg Willits

unread,
Sep 15, 2010, 2:47:50 PM9/15/10
to rubyonra...@googlegroups.com
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.

Hongli Lai

unread,
Sep 15, 2010, 3:03:44 PM9/15/10
to Ruby on Rails: Talk
On Sep 15, 8:30 pm, Greg Willits <li...@ruby-forum.com> 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.

Marnen Laibow-Koser

unread,
Sep 15, 2010, 3:11:59 PM9/15/10
to rubyonra...@googlegroups.com
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,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Marnen Laibow-Koser

unread,
Sep 15, 2010, 3:13:17 PM9/15/10
to rubyonra...@googlegroups.com

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

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Greg Willits

unread,
Sep 15, 2010, 3:48:37 PM9/15/10
to rubyonra...@googlegroups.com

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

Hongli Lai

unread,
Sep 15, 2010, 3:26:15 PM9/15/10
to Ruby on Rails: Talk
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/

Marnen Laibow-Koser

unread,
Sep 15, 2010, 10:16:39 PM9/15/10
to rubyonra...@googlegroups.com
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,

jergason

unread,
Sep 15, 2010, 4:05:34 PM9/15/10
to Ruby on Rails: Talk
The Mac OS X Terminal.app also supports tabs.

Parker Selbert

unread,
Sep 16, 2010, 9:19:56 AM9/16/10
to rubyonra...@googlegroups.com
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/

Robert Walker

unread,
Sep 16, 2010, 10:10:02 AM9/16/10
to rubyonra...@googlegroups.com
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.

Marnen Laibow-Koser

unread,
Sep 16, 2010, 10:12:05 AM9/16/10
to rubyonra...@googlegroups.com

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,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Stan Kaufman

unread,
Sep 16, 2010, 1:56:55 PM9/16/10
to Ruby on Rails: Talk
On Sep 16, 6:19 am, Parker Selbert <li...@ruby-forum.com> wrote:
> Unicorn is pure Ruby and works perfectly with Rails3 -http://github.com/defunkt/unicorn

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...

Marnen Laibow-Koser

unread,
Sep 16, 2010, 2:18:37 PM9/16/10
to rubyonra...@googlegroups.com

Or they were just trying to provide examples for several common choices.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Peter De Berdt

unread,
Sep 16, 2010, 2:54:20 PM9/16/10
to rubyonra...@googlegroups.com

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.


Best regards


Peter De Berdt


Greg Willits

unread,
Sep 17, 2010, 1:03:40 AM9/17/10
to rubyonra...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages