auth_sources#new wrong number of arguments (given 0, expected 1..2) error
Added by Marek Lipka over 8 years ago
I use Redmine 3.2 version with many plugins. The problem I face is an error when I try to add new auth source (auth_sources#new action
). The error message with the relevant fragment of backtrace is:
ArgumentError - wrong number of arguments (given 0, expected 1..2): /home/mlipka/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:73:in `timeout' /home/mlipka/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:120:in `timeout' ransack (1.7.0) lib/ransack/helpers/form_builder.rb:10:in `value' actionview (4.2.5.2) lib/action_view/helpers/tags/base.rb:38:in `value_before_type_cast' actionview (4.2.5.2) lib/action_view/helpers/tags/text_field.rb:13:in `block in render' actionview (4.2.5.2) lib/action_view/helpers/tags/text_field.rb:13:in `fetch' actionview (4.2.5.2) lib/action_view/helpers/tags/text_field.rb:13:in `render' actionview (4.2.5.2) lib/action_view/helpers/form_helper.rb:787:in `text_field' actionview (4.2.5.2) lib/action_view/helpers/form_helper.rb:1323:in `text_field' lib/redmine/views/labelled_form_builder.rb:31:in `text_field'
I figured out the direct cause of this error is that method AuthSource#timeout
is overriden by Timeout#timeout
. Because of this name conflict, timeout
is on the Rails reserved words list (https://reservedwords.herokuapp.com/words/timeout?q[word_or_notes_cont]=timeout), so my question is: Shouldn't this attribute be renamed in order to avoid this issue?
Replies (1)
RE: auth_sources#new wrong number of arguments (given 0, expected 1..2) error - Added by Toshi MARUYAMA over 8 years ago
Redmine 3.2 does not support Ruby 2.3.