# Problem when migrating from rails 2.2.2 to rails 2.3.2 on linux SLES10 + apache 2

**URL:** <https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092>\
**Category:** Rails\
**Created:** [April 9, 2009, 12:44am UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092 "2009-04-09T00:44:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 9, 2009, 12:44am UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/1 "2009-04-09T00:44:56Z")

</div>

When I do this migration and I want to launch mongrel\_cluster  
(mongrel\_rails cluster::start), I get an error :  
\*\* Starting Mongrel listening at 127.0.0.1:3010  
\*\* Starting Rails with production environment…  
\*\* Mounting Rails at /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 basic rails app showing only the standard  
index page.

Thanks for your help if someone has an idea.

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 9, 2009, 12:45am UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/2 "2009-04-09T00:45:31Z")

</div>

On Apr 8, 10:16 pm, Madchipset [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> index page.

Definitely sounds like a plugin or monkey patch issue to me -  
AbstractRequest was a class that disappeared in rails 2.3. I’d start  
by searching your code for that and see what comes up.

Fred

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 9, 2009, 7:21pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/3 "2009-04-09T19:21:51Z")

</div>

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\_cluster which causes the problem ?

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 9, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/4 "2009-04-09T23:28:18Z")

</div>

On Apr 9, 6:17 pm, Madchipset [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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\_cluster which causes the problem ?

Did you try a newer version of mongrel ?

Fred

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 10, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/5 "2009-04-10T15:45:03Z")

</div>

I’m using mongrel (1.1.5) and mongrel\_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 in rails 2.2.2

Any idea ?

Thanks anyway for your kind help.

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 10, 2009, 4:57pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/6 "2009-04-10T16:57:06Z")

</div>

On Apr 10, 2:44 pm, Madchipset [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> It used to work perfectly when I was in rails 2.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

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 20, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/7 "2009-04-20T17:13:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [February 5, 2010, 11:24am UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/8 "2010-02-05T11:24:38Z")

</div>

Hi,

Thanks, it solved my problem. Although it looks like a hack to me. Isn’t  
this a bug in mongrel\_service? Should we report it?

## As of today I am using Ruby 1.8.7, Rail 2.3.5 and Rubygems 1.3.5. As for Mongrel: mongrel (1.1.5) and mongrel\_service (0.3.4) and the problem still exists.

View this message in context:  
[http://old.nabble.com/Problem-when-migrating-from-rails-2.2.2-to-rails-2.3.2-on-linux--SLES10-%2B-apache-2-tp22961256p27465916.html](http://old.nabble.com/Problem-when-migrating-from-rails-2.2.2-to-rails-2.3.2-on-linux--SLES10-%2B-apache-2-tp22961256p27465916.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Madchipset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Madchipset](https://www.ruby-forum.com/u/Madchipset)\
**Post date:** [April 10, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/problem-when-migrating-from-rails-2-2-2-to-rails-2-3-2-on-linux-sles10-apache-2/165092/9 "2009-04-10T17:05:54Z")

</div>

I have 2 rails apps 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 my rails’  
apps (and in what file : environment.rb ?)

Thanks.

On Apr 10, 4:56 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
