Defect #7688

Redmine's trunk (rails 2.3.11) doesn't work with Mongrel 1.1.x

Added by Jean-Baptiste Barth about 1 year ago. Updated 2 months ago.

Status:Closed Start date:2011-02-22
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Gems support
Target version:-
Affected version:devel Resolution:Wont fix

Description

I reproduce here Etienne's comment in #6887 (Rails upgrade) :

Note that Mongrel 1.1.5 does not work anymore with Rails 2.3.8 or later because of 2 bugs respectively in rack 1.1.x and Mongrel 1.1.5.

See ticket 4690 in Rails tracker and ticket 5 in Mongrel's.

Until Mongrel 1.2.0 is out, it is required to add a mongrel.rb initializer to config/initializers.

I can't reproduce with "mongrel + script/server", but I confirm "mongrel_rails" crashes, and I confirm the proposed initializer solves the problem on a development instance.

A few questions :
  • does anybody know if it affects Thin too ?
  • can anybody test it some days in production to see if it doesn't have any drawback ? There's no feedback on rails lighthouse tracker for the moment..

mongrel.rb - mongrel.rb (2.8 kB) Magnifier Giuseppe Lippolis, 2011-12-11 22:35


Related issues

related to Feature #6887: Upgrade to Rails 2.3.11 Closed 2010-11-13
related to Defect #8520: "Error 500" on login to a fresh Redmine 1.2.0 install Closed 2011-06-03

History

#1 Updated by Etienne Massip about 1 year ago

I'm running it in production (low traffic, only 4-5 daily users) since this morning and had no problem until now.

Do you plan to commit it into config/initializers ?

I thought to simply add a HowTo when 1.2.0 is out...

#2 Updated by Jean-Baptiste Barth about 1 year ago

Yes, I think we should add it to config/initializers so it will be transparent for users. Or we will have tons of support requests for this, and Rails ticket isn't an easy read for everybody...

#3 Updated by Ivan Cenov 12 months ago

Hmmmm..., Mongrel 1.1.5 is released on May 22, 2008. Is this project developed at all?

#4 Updated by Etienne Massip 12 months ago

Last commit is dated of July 24, 2010.

But it is still used.

#5 Updated by Ivan Cenov 12 months ago

Most Active This Week shows 96.90% activity.
On the other side, http://mongrel.rubyforge.org/svn/ does not respond just now.

Besides of this, I have installed patch_for_mongrel.rb that resolves what is described in this thread. This is related to Mongrel_rails service "--prefix" that does not work well with Rails 2.3.x.

Regarding this, are both patches mongrel.rb and patch_for_mongrel.rb compatible? Are both needed in Rails 2.3.11 ?

Note that I do not understand Ruby, Ruby on Rails and it is possibly that I do not describe these things exactly.

#6 Updated by Etienne Massip 12 months ago

Hit a bug with AJAX which I supposed is due to this path but not necessarily :

After some time of use, an AJAX request like parent task auto-complete lookup or adding a new category / version directly from the issue form will perform well but the next request (e.g. new parent task lookup or issue submission) will redirect the user to the login page (with a 401 "non authorized" HTTP error code).

As if last set cookie value was invalid.

#7 Updated by Patrice Bonhomme 12 months ago

Same for me since Redmine 1.1.2, when i try to add a relation between two issues. I am using Apache2/Passenger 2.2.8.

#8 Updated by Etienne Massip 12 months ago

See issue #7843 for latest comments.

#9 Updated by Etienne Massip 9 months ago

  • Category set to Gems support

#10 Updated by Jean-Philippe Lang 9 months ago

  • Status changed from New to Closed
  • Target version deleted (1.2.0)
  • Resolution set to Wont fix

#11 Updated by bo ye 8 months ago

We use patch_for_mongrel.rb and mongrel.rb together, it is fine for now.

Ivan Cenov wrote:

Most Active This Week shows 96.90% activity.
On the other side, http://mongrel.rubyforge.org/svn/ does not respond just now.

Besides of this, I have installed patch_for_mongrel.rb that resolves what is described in this thread. This is related to Mongrel_rails service "--prefix" that does not work well with Rails 2.3.x.

Regarding this, are both patches mongrel.rb and patch_for_mongrel.rb compatible? Are both needed in Rails 2.3.11 ?

Note that I do not understand Ruby, Ruby on Rails and it is possibly that I do not describe these things exactly.

#12 Updated by Ivan Cenov 8 months ago

bo ye wrote:

We use patch_for_mongrel.rb and mongrel.rb together, it is fine for now.

Ivan Cenov wrote:

Most Active This Week shows 96.90% activity.
On the other side, http://mongrel.rubyforge.org/svn/ does not respond just now.

Besides of this, I have installed patch_for_mongrel.rb that resolves what is described in this thread. This is related to Mongrel_rails service "--prefix" that does not work well with Rails 2.3.x.

Regarding this, are both patches mongrel.rb and patch_for_mongrel.rb compatible? Are both needed in Rails 2.3.11 ?

Note that I do not understand Ruby, Ruby on Rails and it is possibly that I do not describe these things exactly.

I am running now Redmine 1.2.0 and use mongrel.rb only and it seems all is OK. I never tried to see what would happen if both patches are in.

#13 Updated by Alfredo Bonilla 8 months ago

Hi, I placed both files mongrel.rb and patch_for_mongrel.rb in /<my-redmine-path>/config/initializers/ plus rails_6440_patch.rb

and I'm still "redirected"... and mongrel fails (log:

Error calling Dispatcher.dispatch #<NoMethodError: undefined method `[]' for nil:NilClass>
/usr/lib/ruby/1.8/mongrel/cgi.rb:108:in `send_cookies'.....
)

Please, let me know if I'm missing something or doing something wrong!!):
Thx in advance

#14 Updated by Etienne Massip 8 months ago

Did you restart your server ?

#15 Updated by Etienne Massip 8 months ago

  • Assignee deleted (Jean-Baptiste Barth)

#16 Updated by Alfredo Bonilla 8 months ago

Thanks for your answer Etienne... I found the problem... We did not install mongrel gems. We installed mongrel directly with apt-get.

The first IF in mongrel.rb patch asks for the RAILS version (2.3.11), ok... and for the GEM MONGREL 1.1.5... and, obviously, no gem, no condition satisfied... the patch was useless.

Now we are working without patch_for_mongrel.rb and without rails_6440_patch.rb.

#17 Updated by Etienne Massip 8 months ago

Thanks for the clarification. I see a lot of trouble with Debian ruby gems packages...

#18 Updated by Sooraj B 6 months ago

Hi,
I just got this issue again. But, when i tried to login from a different browser, it worked.
Failed to login from Ubuntu 10.04, Firefox 3.6.18
Logged in successfully from Chrome ( same pc)

#19 Updated by sword alone 4 months ago

using this method , it works for me.
thks.

Alfredo Bonilla wrote:

Hi, I placed both files mongrel.rb and patch_for_mongrel.rb in /<my-redmine-path>/config/initializers/ plus rails_6440_patch.rb

and I'm still "redirected"... and mongrel fails (log: [...])

Please, let me know if I'm missing something or doing something wrong!!):
Thx in advance

#20 Updated by Giuseppe Lippolis 2 months ago

I have same issue with redmine 1.3.0 . for fix it i have update mongrel.rb adding '2.3.14' to rails version on first line. I send fixed file as attached.

Also available in: Atom PDF