Project

General

Profile

Redmine 3.4.3 + IIS 8.5 (HeliconZoo manual upgrade) Error 500

Added by Rodrigue DAL about 6 years ago

Oleg Savchuk wrote:

I'm spending more than 2 weeks on deploying Redmine 3.4 on Windows IIS.
And now, when I already install it and migrate the DB, I'm faced with the problem undefined method `path' for nil:NilClass (NoMethodError)
How can I fix it?

Thank you

Hello,

I try to install redmine 3.4.3 in Windows SERVER 2012 R2, IIS 8.5.

First, i followed this steps to install HeliconZoo and redmine 2.2
http://www.helicontech.com/articles/installing-redmine-on-windows-in-production/

Second, i followed this steps to upgrade Ruby and rack versions to support redmine 3.4.3
https://www.codeproject.com/Tips/805628/Ruby-on-Rails-On-Windows-Server-With-Helicon-Zoo

I can display all pages in GET request (/login, /projects, /account/register, etc..;)
But, when i submit one form (POST method), i obtain the same error of you.

192.168.67.151 - [11/Jan/2018:08:28:12 +0100] "POST /account/register HTTP/1.1" 302 - 0.7969
[tid-5636040] undefined method `path' for nil:NilClass (NoMethodError)
C:/Ruby233/lib/ruby/2.3.0/tempfile.rb:207:in `unlink'
C:/Ruby233/lib/ruby/2.3.0/tempfile.rb:162:in `close'
C:/Ruby233/lib/ruby/2.3.0/tempfile.rb:168:in `close!'
E:/inetpub/redmine2/vendor/cache/ruby/2.3.0/gems/rack-1.6.8/lib/rack/rewindable_input.rb:52:in `close'
C:/Zoo/Workers/ruby/lib/request.rb:63:in `serve'
C:/Zoo/Workers/ruby/lib/worker.rb:42:in `handle_request'
C:/Zoo/Workers/ruby/lib/worker.rb:36:in `process'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `block in run'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `loop'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `run'
C:/Zoo/Workers/ruby/zoorack.rb:30:in `<module:Zack>'
C:/Zoo/Workers/ruby/zoorack.rb:12:in `<main>'

Ruby -v : 2.3.3p222 '2016-11-21 revision 56859) [x64-mingw32]
Rails -v : Rails 4.2.8

gem list :
actionmailer (4.2.8)
actionpack (4.2.8)
actionpack-xml_parser (1.0.2)
actionview (4.2.8)
activejob (4.2.8)
activemodel (4.2.8)
activerecord (4.2.8)
activesupport (4.2.8)
addressable (2.5.2)
arel (6.0.4)
bigdecimal (1.2.8)
builder (3.2.3)
bundler (1.16.1)
capybara (2.17.0)
childprocess (0.8.0)
coderay (1.1.2)
concurrent-ruby (1.0.5)
crass (1.0.3)
css_parser (1.6.0)
did_you_mean (1.0.0)
docile (1.1.5)
erubis (2.7.0)
ffi (1.9.18 x64-mingw32)
globalid (0.4.1)
htmlentities (4.3.4)
i18n (0.7.0)
io-console (0.4.5)
jquery-rails (3.1.4)
json (1.8.3)
loofah (2.1.1)
mail (2.7.0)
metaclass (0.0.4)
mime-types (3.1)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.1.0)
minitest (5.11.1, 5.8.5)
mocha (1.3.0)
multi_json (1.13.0)
mysql2 (0.4.10 x64-mingw32)
net-ldap (0.12.1)
net-telnet (0.1.1)
nokogiri (1.7.2 x64-mingw32)
power_assert (0.2.6)
protected_attributes (1.1.4)
psych (2.1.0)
public_suffix (3.0.1)
rack (1.6.8)
rack-openid (1.4.2)
rack-test (0.6.3)
rails (4.2.8)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.9)
rails-html-sanitizer (1.0.3)
railties (4.2.8)
rake (12.3.0, 10.4.2)
rbpdf (1.19.3)
rbpdf-font (1.19.1)
rdoc (4.3.0, 4.2.1)
redcarpet (3.4.0)
request_store (1.0.5)
roadie (3.2.2)
roadie-rails (1.1.1)
ruby-openid (2.3.0)
rubyzip (1.2.1)
selenium-webdriver (2.53.4)
simplecov (0.9.2)
simplecov-html (0.9.0)
sprockets (3.7.1)
sprockets-rails (3.2.1)
test-unit (3.1.5)
test_after_commit (0.4.2)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.4)
tzinfo-data (1.2017.3)
websocket (1.2.5)
xpath (2.1.0)
yard (0.9.12)

Part of my redmine logs :

Started POST "/login" for 192.168.252.38 at 2018-01-11 08:37:20 +0100
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"Connexion"}
   [1m [36m (0.0ms) [0m   [1mSELECT MAX(`settings`.`updated_on`) FROM `settings` [0m
   [1m [35mSetting Load (0.0ms) [0m  SELECT  `settings`.* FROM `settings` WHERE `settings`.`name` = 'rest_api_enabled'  ORDER BY `settings`.`id` DESC LIMIT 1
   [1m [36mAnonymousUser Load (0.0ms) [0m   [1mSELECT  `users`.* FROM `users` WHERE `users`.`type` IN ('AnonymousUser')  ORDER BY `users`.`id` ASC LIMIT 1 [0m
  Current user: anonymous
   [1m [35mSetting Load (0.0ms) [0m  SELECT  `settings`.* FROM `settings` WHERE `settings`.`name` = 'force_default_language_for_anonymous'  ORDER BY `settings`.`id` DESC LIMIT 1
   [1m [36mSetting Load (0.0ms) [0m   [1mSELECT  `settings`.* FROM `settings` WHERE `settings`.`name` = 'openid'  ORDER BY `settings`.`id` DESC LIMIT 1 [0m
   [1m [35mUser Load (0.0ms) [0m  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`login` = 'admin'
   [1m [36mSQL (0.0ms) [0m   [1mUPDATE `users` SET `users`.`last_login_on` = '2018-01-11 08:37:21' WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = 1 [0m
Successful authentication for 'admin' from 192.168.252.38 at 2018-01-11 07:37:21 UTC
   [1m [35m (0.0ms) [0m  BEGIN
   [1m [36mToken Exists (0.0ms) [0m   [1mSELECT  1 AS one FROM `tokens` WHERE `tokens`.`value` = BINARY '' LIMIT 1 [0m
   [1m [35mUser Load (0.0ms) [0m  SELECT  `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = 1 LIMIT 1
   [1m [36m (0.0ms) [0m   [1mSELECT `tokens`.`id` FROM `tokens` WHERE `tokens`.`user_id` = 1 AND `tokens`.`action` = 'session'  ORDER BY `tokens`.`updated_on` DESC LIMIT 18446744073709551615 OFFSET 9 [0m
   [1m [35mSQL (0.0ms) [0m  INSERT INTO `tokens` (`user_id`, `action`, `created_on`, `updated_on`, `value`) VALUES (1, 'session', '2018-01-11 08:37:21', '2018-01-11 08:37:21', '[FILTERED]')
   [1m [36m (0.0ms) [0m   [1mCOMMIT [0m
Redirected to http://redmine.[DOMAIN]/my/page
Completed 302 Found in 484ms (ActiveRecord: 15.7ms)

Thanks for your help.

Rodrigue.


Replies (1)

RE: Redmine 3.4.3 + IIS 8.5 (HeliconZoo manual upgrade) Error 500 - Added by Michael Bruegmann over 5 years ago

Hi,

know this article is old, but ran in exactly same error this week, after upgrading from redmine 2.6.5 to 3.4.6 (with upgrade from ruby 2.1 x86 to ruby 2.4.4 x64).

Found out that's a incompatibility between 'rack-1.6.x' and ruby 2.4.4. The rack file 'rewindable_input.rb' overrides 'Tempfile::_close' method in wrong way (it sets '@tempfile = nil') what causes the above error.

In later (actual) versions of 'rack' the override of 'Tempfile::_close' no longer exists. Because i'm a ruby newbie i don't really know how to resolve the version conficts. I just removed the '_close'-override which worked for me.

Greets

    (1-1/1)