Re: Can't get mod_ruby to work
David Heinemeier Hansson <[email protected]> Thu, 15 Nov 2007 11:30:10 -0600
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Please. Before you throw your arms up in despair and forsake all that is good, have a look at what's been a best-practice deployment scenario for a long time now: Web server -> proxy -> mongrels. If you like Apache, you can for example use mod_proxy_balancer (see http://blog.innerewut.de/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel for detailed instructions). Or you could use HAProxy (see http://rubyworks.rubyforge.org/installation/installation-continued.html for more). There are tons of options out there and thousands of sites putting them to good use in production. Abandoning Rails because you haven't looked into deployment scenarios is like scrapping your car in favor of a horse because you can't figure out how to open the trunk. An overreaction. > Hello, > > I can't help you, but I've pass through for almost the same > configuration problems. > I like very much the way things work in Ruby on Rails but when we need > to deploy to production in Apache the problems arise. > Why don't you take a look in grails that works like ruby and is very > simple to deploy to Apache Tomcat? > Here is the link -> http://grails.codehaus.org/ > > Manuel > > On Nov 15, 2007 3:10 PM, Arnold Daniels <[email protected]> wrote: >> Hi all, >> >> I'm trying to use mod_ruby to serve a Ruby On Rails application. The >> applications currently works with dispatch.cgi. I'm running Ubuntu >> Gutsy >> and installed ruby, mod_ruby and rails using apt-get. This package >> only >> comes with a ruby.load configuration file, which loads mod_ruby, but >> does nothing more. I've created a ruby.conf file, based on the >> information on the site. However as soon as I add 'RubyRequire >> apache/ruby-run', the server stops responding. It accepts the >> connection, but never handles the request. This is not only for ruby >> scripts, but for all requests, even for static content. I do not >> get any >> report in the error log. >> >> Does this make sense to someone? I can't retrieve info, so I'm stuck. >> >> Any help would be highly appreciated. >> >> Best regards, >> Arnold Daniels >> >> ------------------- >> >> root@arnold-laptop:/var/log/apache2# apache2 -v >> Server version: Apache/2.2.4 (Ubuntu) >> Server built: Oct 7 2007 22:17:24 >> >> >> root@arnold-laptop:/etc/apache2/mods-enabled# cat ruby.load >> LoadModule ruby_module /usr/lib/apache2/modules/mod_ruby.so >> root@arnold-laptop:/etc/apache2/mods-enabled# cat ruby.conf >> <IfModule mod_ruby.c> >> RubyRequire apache/ruby-run >> >> # Execute files under /ruby as Ruby scripts >> # <Location /ruby> >> # SetHandler ruby-object >> # RubyHandler Apache::RubyRun.instance >> # </Location> >> >> # Execute *.rb files as Ruby scripts >> <Files *.rb> >> SetHandler ruby-object >> RubyHandler Apache::RubyRun.instance >> </Files> >> </IfModule> >> >> > -- David Heinemeier Hansson