$ rails server
=> Booting Mongrel
=> Rails 3.0.0.beta3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Starts with mongrel. But the following crashes:
$ mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
/Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/engine.rb:122:in delegate': wrong argument type Symbol (expected Proc) (TypeError) from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/activesupport-3.0.0.beta3/lib/active_support/core_ext/module/delegation.rb:121:in each’
from
/Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/activesupport-3.0.0.beta3/lib/active_support/core_ext/module/delegation.rb:121:in delegate' from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/engine.rb:127 from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/plugin.rb:1:in require’
from
/Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/plugin.rb:1
from
/Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/application.rb:3:in require' from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails/application.rb:3 from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/railties-3.0.0.beta3/lib/rails.rb:7:in require’
… 19 levels…
from
/Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/mongrel-1.2.0.pre2/bin/…/lib/mongrel/command.rb:210:in run' from /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p249@rails3/gems/mongrel-1.2.0.pre2/bin/mongrel_rails:282 from /usr/bin/mongrel_rails:19:in load’
from /usr/bin/mongrel_rails:19
Not sure where to go from here. Any help would be appreciated.
Add ‘mongrel’ to Gemfile
=> Ctrl-C to shutdown server
Not sure where to go from here. Any help would be appreciated.
There are substantial changes in the way Rails 3 bootstrap that differ
considerably from what mongrel_rails is trying to perform.
The problem is that mongrel_rails needs to work with older versions of
Rails and newer too.
I haven’t played enough with Rails 3 to actually use mongrel with it,
but due the changes in rails 3 bootstrap, I would rather use rack or
rails server directly instead of mongrel_rails.
–
Luis L.
AREA 17
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
I haven’t played enough with Rails 3 to actually use mongrel with it,
but due the changes in rails 3 bootstrap, I would rather use rack or
rails server directly instead of mongrel_rails.
Or passenger. I get the feeling that most developers have abandoned
mongrel for passenger, and mongrel no longer has very many developers
working on improving/maintaining mongrel itself either.
Passenger might be the way to go long term but right now I have some
production machines that I can’t take the
time to upgrade/test/debug. I can’t use rails server in production
because I need to launch them specifying --user
and --group (plus it would mean changing the whole request dispatch /
process scheme I’m using).
I’ll try to dig deeper into this over the weekend. Any pointers would
be welcomed.
While I use passenger in some server, I still use mongrel in more than
75% of all my production environments, even locally.
I’m cleaning up JRuby support for a new 1.2.0 release and new ones will
follow.
What I have suggested about using “rails server” instead of
mongrel_rails is because mongrel_rails needs to be compatible with
previous version of Rails, and I’m not a 100% Rails user to explore
that. See this ticket:
It’s more inertia than preference. I’ve been running passenger on one
of our test servers, but our production environment
consists of a pool of servers that run a bunch of low volume rails
apps. The life cycle of these apps are managed through
custom code that launches them via mongrel_rails (this setup pre-dates
passenger). Passenger would be a fine solution
(although I wish it provided better control over how many of which app
were running), but requires a lot of testing before
releasing to production.
One possibility is to install passenger on the production machines but
not run it in “auto-detect” mode. That way one app
at a time could be moved to passenger. I need to do some more testing
of that configuration.
Still in the short term the shortest path for me to get a rails 3 app on
our production servers is to be able to launch it via
mongrel_rails.