Defect #7688
closedRedmine's trunk (rails 2.3.11) doesn't work with Mongrel 1.1.x
Added by Jean-Baptiste Barth over 13 years ago. Updated over 12 years ago.
0%
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
Updated by Etienne Massip over 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...
Updated by Jean-Baptiste Barth over 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...
Updated by Ivan Cenov over 13 years ago
Hmmmm..., Mongrel 1.1.5 is released on May 22, 2008. Is this project developed at all?
Updated by Etienne Massip over 13 years ago
Last commit is dated of July 24, 2010.
But it is still used.
Updated by Ivan Cenov over 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.
Updated by Etienne Massip over 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.
Updated by Anonymous over 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.
Updated by Etienne Massip over 13 years ago
See issue #7843 for latest comments.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from New to Closed
- Target version deleted (
1.2.0) - Resolution set to Wont fix
Updated by bo ye over 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.
Updated by Ivan Cenov over 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.
Updated by Alfredo Bonilla over 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
Updated by Etienne Massip over 13 years ago
- Assignee deleted (
Jean-Baptiste Barth)
Updated by Alfredo Bonilla over 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.
Updated by Etienne Massip over 13 years ago
Thanks for the clarification. I see a lot of trouble with Debian ruby gems packages...
Updated by Sooraj B over 13 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)
Updated by sword alone about 13 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
Updated by Giuseppe Lippolis almost 13 years ago
- File mongrel.rb mongrel.rb added
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.
Updated by Abhishek Singh over 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.
Updated by Etienne Massip over 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.
Updated by Anonymous over 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...)