Defect #10432
closedRack 1.1.3 NoMethodError (private method `gsub' called for :autologin:Symbol)
0%
Description
Hi everyone, I'm running latest Redmine 1.3.2.stable.9236 (MySQL). I upgraded correctly the application (no errors with rake db:migrate RAILS_ENV=production --trace) and the website is working without any visible error (I checked the logs too to be absolutely sure). I've enabled the WebService REST calls to import some Issues from MS Project via a third-party application. Redmine is installed in Ubuntu 10.04 LTS with the ruby and redmine PPA. The versions of ruby, rails and gems seems right to me accordling to your installation requirements:
xxx@redmine:/usr/share/redmine$ ruby --version ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux] xxx@redmine:/usr/share/redmine$ rails --version Rails 2.3.14 xxx@redmine:/usr/share/redmine$ gem list *** LOCAL GEMS *** actionmailer (2.3.14) actionpack (2.3.14) activerecord (2.3.14) activeresource (2.3.14) activesupport (2.3.14) cgi_multipart_eof_fix (2.5.0) daemons (1.1.8) fastthread (1.0.7) gem_plugin (0.2.3) i18n (0.4.2) mongrel (1.1.5) mysql (2.8.1) rack (1.1.3) rails (2.3.14) rake (0.8.7)
when the WS is called I receive this error call stack:
Processing IssuesController#create to xml (for 192.168.2.10 at 2012-03-12 16:30:28) [POST] Parameters: {"format"=>"xml", "issue"=>{"due_date"=>"2012-08-10", "project_id"=>"xxx-b2c", "start_date"=>"2012-08-09", "estimated_hours"=>"8.0", "status_id"=>"1", "done_ratio"=>"0", "tracker_id"=>"2", "parent_issue_id"=>"613", "subject"=>" (IF APPLICABLE) Create Client Specific DR failover documentation", "description"=>nil}, "controller"=>"issues", "action"=>"create"} NoMethodError (private method `gsub' called for :autologin:Symbol): /usr/lib/ruby/vendor_ruby/rack/backports/uri/common.rb:24:in `encode_www_form_component' /usr/lib/ruby/vendor_ruby/rack/utils.rb:23:in `escape' /usr/lib/ruby/vendor_ruby/rack/utils.rb:201:in `set_cookie_header!' /usr/lib/ruby/vendor_ruby/rack/utils.rb:238:in `delete_cookie_header!' app/controllers/application_controller.rb:32:in `handle_unverified_request' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61 Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
The error seems very similar to bug #9118 but the given patch doesn't work with the current 1.1.3 Rack installation.
second part of the patch:
@@ -204,7 +204,7 @@ # generate a key and set cookie if autologin if params[:autologin] && Setting.autologin? token = Token.create(:user => user, :action => 'autologin') - cookies[:autologin] = { :value => token.value, :expires => 1.year.from_now } + cookies[:autologin.to_s] = { :value => token.value, :expires => 1.year.from_now } end call_hook(:controller_account_success_authentication_after, {:user => user }) redirect_back_or_default :controller => 'my', :action => 'page'
doesn’t match with the new version of the file. The code Is now:
# generate a key and set cookie if autologin if params[:autologin] && Setting.autologin? set_autologin_cookie(user) end
Here's some detailed information of my Redmine installation and MySql version:
xxx@redmine:/usr/share/redmine$ RAILS_ENV=production ruby script/about NOTE: SourceIndex.new(hash) is deprecated; From /var/lib/gems/1.8/gems/rails-2.3.14/lib/rails/vendor_gem_source_index.rb:100:in `new'. About your application's environment Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.7.2 Rack version 1.1.3 Rails version 2.3.14 Active Record version 2.3.14 Active Resource version 2.3.14 Action Mailer version 2.3.14 Active Support version 2.3.14 Application root /usr/share/redmine Environment production Database adapter mysql Database schema version 20110902000000 mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 6.1
Thanks in advance to everyone that we'll help me on this bug... It's about two days that I'm banging my head against the wall without a solution...
Related issues