I finally got the solution on the web... Thanks to P. Leonhardt and C
Nolte posts. Here is the workaround :

Copy this file in my_rails_app/config/initializers :

abstract_request.rb

module ActionController
  class AbstractRequest < ActionController::Request
    def self.relative_url_root=(path)
      ActionController::Base.relative_url_root=(path)
    end
    def self.relative_url_root
      ActionController::Base.relative_url_root
    end
  end
end

Hope this may help someone else.

Thanks again, my server is working fine now.

On 10 avr, 17:04, Madchipset <mad.chip...@voila.fr> wrote:
> I have 2railsapps on that server. I didn't get from your answer what
> I shall do on the apache conf file and what I shall do on myrails'
> apps (and in what file : environment.rb ?)
>
> Thanks.
>
> On Apr 10, 4:56 pm, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
> > On Apr 10, 2:44 pm, Madchipset <mad.chip...@voila.fr> wrote:
>
> > > I'm using mongrel (1.1.5) andmongrel_cluster(1.0.5) which seem to be
> > > the last versions. I got a bit deeper in the bug analysis. It's a bit
> > > trickiest than I first thought. In fact, I have in my cluster config
> > > file (config/mongrel_cluster.yml) a line : prefix: /my_app_name. If I
> > > delete this line, the cluster will start alright and I have no more
> > > errors ! But I need this line so that in my apache conf file, I use
> > > the <Proxy balancer://my_app_name> line and the rewrite line
> > > (RewriteRule ^/my_app_name(.*)$ balancer://my_app_name%{REQUEST_URI}
> > > [P,QSA,L]).
>
> > > It used to work perfectly when I was inrails2.2.2
>
> > Ah - mongrel does
>
> >         ActionController::AbstractRequest.relative_url_root = ops
> > [:prefix] if ops[:prefix]
>
> > if :prefix is set.
>
> > These days I think you  just set on
> > ActionController::Base.relative_url_root
>
> > Give that that's all the prefix option seems to do, you could not pass
> > it to mongrel and set it in your app's environment
>
> > Fred
>
> > > Any idea ?
>
> > > Thanks anyway for your kind help.
>
> > > On 9 avr, 23:27, Frederick Cheung <frederick.che...@gmail.com> wrote:
>
> > > > On Apr 9, 6:17 pm, Madchipset <mad.chip...@voila.fr> wrote:> Thanks a 
> > > > lot for your reply Fred. First, I checked with my app : I
> > > > > started it fine without the cluster (script/server -e production) and
> > > > > it worked nice. Then I created a basic app without any plugin (rails
> > > > > test), showing only the standard page Welcome aboard. Again it worked
> > > > > fine without the cluster. When I create it (mongrel_rails
> > > > > cluster::configure -e production -p 3010 -N 2 -c /my/path/test -a
> > > > > 127.0.01 --prefix /test) and launch it (mongrel_rails cluster::start)
> > > > > then I get the error reported in log/mongrel.3010.log. So wouldn'it be
> > > > >mongrel_clusterwhich causes theproblem?
>
> > > > Did you try a newer version of mongrel ?
>
> > > > Fred
>
> > > > > On 9 avr, 00:44, Frederick Cheung <frederick.che...@gmail.com> wrote:
>
> > > > > > On Apr 8, 10:16 pm, Madchipset <mad.chip...@voila.fr> wrote:> When 
> > > > > > I do this migration and I want to launchmongrel_cluster
> > > > > > > (mongrel_rails cluster::start), I get an error :
> > > > > > > ** Starting Mongrel listening at 127.0.0.1:3010
> > > > > > > ** StartingRailswith production environment...
> > > > > > > ** MountingRailsat /test...
> > > > > > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> > > > > > > dependencies.rb:440:in `load_missing_constant': uninitialized 
> > > > > > > constant
> > > > > > > ActionController::AbstractRequest (NameError)
> > > > > > > ......................................
> > > > > > > No plugins. It's just a basicrailsapp showing only the standard
> > > > > > > index page.
>
> > > > > > Definitely sounds like a plugin or monkey patch issue to me -
> > > > > > AbstractRequest was a class that disappeared inrails2.3. I'd start
> > > > > > by searching your code for that and see what comes up.
>
> > > > > > Fred
>
> > > > > > > Thanks for your help if someone has an idea.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to