Project

General

Profile

Actions

Defect #7688

closed

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

Added by Jean-Baptiste Barth about 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Gems support
Target version:
-
Start date:
2011-02-22
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

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..

Files

mongrel.rb (2.83 KB) mongrel.rb mongrel.rb Giuseppe Lippolis, 2011-12-11 22:35

Related issues

Related to Redmine - Feature #6887: Upgrade to Rails 2.3.11ClosedJean-Philippe Lang2010-11-13

Actions
Related to Redmine - Defect #8520: "Error 500" on login to a fresh Redmine 1.2.0 installClosed2011-06-03

Actions
Actions #1

Updated by Etienne Massip about 13 years 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...

Actions #2

Updated by Jean-Baptiste Barth about 13 years 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...

Actions #3

Updated by Ivan Cenov about 13 years ago

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

Actions #4

Updated by Etienne Massip about 13 years ago

Last commit is dated of July 24, 2010.

But it is still used.

Actions #5

Updated by Ivan Cenov about 13 years 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.

Actions #6

Updated by Etienne Massip about 13 years 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.

Actions #7

Updated by Anonymous about 13 years 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.

Actions #8

Updated by Etienne Massip about 13 years ago

See issue #7843 for latest comments.

Actions #9

Updated by Etienne Massip almost 13 years ago

  • Category set to Gems support
Actions #10

Updated by Jean-Philippe Lang almost 13 years ago

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

Updated by bo ye almost 13 years 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.

Actions #12

Updated by Ivan Cenov almost 13 years 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.

Actions #13

Updated by Alfredo Bonilla almost 13 years 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

Actions #14

Updated by Etienne Massip almost 13 years ago

Did you restart your server ?

Actions #15

Updated by Etienne Massip almost 13 years ago

  • Assignee deleted (Jean-Baptiste Barth)
Actions #16

Updated by Alfredo Bonilla almost 13 years 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.

Actions #17

Updated by Etienne Massip almost 13 years ago

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

Actions #18

Updated by Sooraj B over 12 years 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)

Actions #19

Updated by sword alone over 12 years 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

Actions #20

Updated by Giuseppe Lippolis over 12 years 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.

Actions #21

Updated by Abhishek Singh about 12 years ago

  • Status changed from Closed to Reopened

I'm using redmine 1.3.2 and I'm also facing this problem. I'm using this on a CentOS 6.2 system with cpanel and mongrel installed from the repository. I tried putting mongrel.rb and patch_for_mongrel.rb in my <my_redmine_path>/config/initializers, but it didn't work. I tried other cases too like putting just mongrel.rb or just patch_for_mongrel.rb in the initializers, but all in vain. The error that I get in mongrel.log is:

Thu Mar 29 03:07:50 +0000 2012: Error calling Dispatcher.dispatch #<NoMethodError: private method `split' called for nil:NilClass>
<my_redmine>/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:52:in `dispatch_cgi'
<my_redmine>/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
<my_redmine>/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:27:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19

Any idea what might be causing this? Any solutions are welcome. Thank You.

Actions #22

Updated by Etienne Massip about 12 years ago

  • Status changed from Reopened to Closed

This is not a Redmine issue.

Mongrel is no maintained anymore, you should consider switching to Unicorn or Thin.

Actions #23

Updated by Anonymous almost 12 years ago

Abhishek Singh wrote:

I'm using redmine 1.3.2 and I'm also facing this problem. I'm using this on a CentOS 6.2 system with cpanel and mongrel installed from the repository. I tried putting mongrel.rb and patch_for_mongrel.rb in my <my_redmine_path>/config/initializers, but it didn't work. I tried other cases too like putting just mongrel.rb or just patch_for_mongrel.rb in the initializers, but all in vain. The error that I get in mongrel.log is:
[...]

Any idea what might be causing this? Any solutions are welcome. Thank You.

Did you try what Giuseppe Lippolis suggested (Comment 20), adding '2.3.14' to the list of version numbers in the first line of mongrel.rb? I had the same exact error, and mongrel.rb didn't resolve it, until I opened it up and saw the list version numbers - dropping '2.3.14' in the list after '2.3.11' did the trick for me. (I would have saved myself twenty minutes and a headache if I'd just read the whole thread here...)

Actions

Also available in: Atom PDF