Defect #6775
closed
Wrong number of arguments for issues in project view
Added by Jesse Armand about 14 years ago.
Updated about 14 years ago.
Description
Database version: PostgreSQL 8.4.5
Ruby version: 1.8.7
Rails version: 2.3.8
Redmine version: commit 5d6245b05950a4e6fd5a in the master branch of github repository.
ActionView::TemplateError (wrong number of arguments (2 for 0)) on line #34 of app/views/projects/show.rhtml:
31: <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => Herve Harster,
32: :set_filter => 1,
33: "tracker_id" => tracker.id >:
34: <= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
35: :total => @total_issues_by_tracker[tracker].to_i) >
36: </li>
37: < end %>
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `warn_syntax_deprecation!'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `interpolate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `gsub'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `interpolate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:46:in `translate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n.rb:160:in `t'
lib/redmine/i18n.rb:13:in `l'
app/views/projects/show.rhtml:34:in `_run_rhtml_app47views47projects47show46rhtml'
app/views/projects/show.rhtml:30:in `each'
app/views/projects/show.rhtml:30:in `_run_rhtml_app47views47projects47show46rhtml'
app/controllers/projects_controller.rb:170:in `show'
thin (1.2.7) lib/thin/connection.rb:76:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:74:in `catch'
thin (1.2.7) lib/thin/connection.rb:74:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:57:in `process'
thin (1.2.7) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.7) lib/thin/backends/base.rb:57:in `start'
thin (1.2.7) lib/thin/server.rb:156:in `start'
thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start'
thin (1.2.7) lib/thin/runner.rb:177:in `send'
thin (1.2.7) lib/thin/runner.rb:177:in `run_command'
thin (1.2.7) lib/thin/runner.rb:143:in `run!'
thin (1.2.7) bin/thin:6
/usr/bin/thin:19:in `load'
/usr/bin/thin:19
The complete trace message:
ActionView::TemplateError (wrong number of arguments (2 for 0)) on line #34 of app/views/projects/show.rhtml:
31: <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
32: :set_filter => 1,
33: "tracker_id" => tracker.id %>:
34: <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
35: :total => @total_issues_by_tracker[tracker].to_i) %>
36: </li>
37: <% end %>
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `warn_syntax_deprecation!'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `interpolate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `gsub'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `interpolate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:46:in `translate'
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n.rb:160:in `t'
lib/redmine/i18n.rb:13:in `l'
app/views/projects/show.rhtml:34:in `_run_rhtml_app47views47projects47show46rhtml'
app/views/projects/show.rhtml:30:in `each'
app/views/projects/show.rhtml:30:in `_run_rhtml_app47views47projects47show46rhtml'
app/controllers/projects_controller.rb:170:in `show'
thin (1.2.7) lib/thin/connection.rb:76:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:74:in `catch'
thin (1.2.7) lib/thin/connection.rb:74:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:57:in `process'
thin (1.2.7) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.7) lib/thin/backends/base.rb:57:in `start'
thin (1.2.7) lib/thin/server.rb:156:in `start'
thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start'
thin (1.2.7) lib/thin/runner.rb:177:in `send'
thin (1.2.7) lib/thin/runner.rb:177:in `run_command'
thin (1.2.7) lib/thin/runner.rb:143:in `run!'
thin (1.2.7) bin/thin:6
/usr/bin/thin:19:in `load'
/usr/bin/thin:19
- Category deleted (
Projects)
- Status changed from New to Closed
- Assignee deleted (
Eric Davis)
- Resolution set to Invalid
Make sure you use rails 2.3.5.
Did using rails 2.3.5 solve the problem for you?
Hmm no.
Because I need to use thin and rails 2.3.8, and rails 2.3.5 is dependent on rack 1.0.1, so I decided to do this:
I use rails 2.3.8, and I use Bundler to load i18n gem version 0.3.7. Because the problem is only about that the deprecated syntax detected in i18n gem.
It works as far as I see.
Jesse Armand wrote:
It works as far as I see.
There are other places known to break with rails 2.3.8, IIRC some drop-downs and stuff like that. Freeze rails 2.3.5 to your redmine and use that instead, rack 1.0.1 is needed too (don't know if using a newer version breaks stuff though).
In that case, I will use mongrel for this or something that doesn't load the latest rack.
Thin is always loading the latest rack. I don't know how make it to use a specific version of rack.
Unless if I uninstall rails 2.3.8 and rack 1.1.0, or anything newer than 2.3.5.
- Status changed from Closed to Reopened
Same problem occures when newer version of i18n gem was installed in system. Problem in rails activesupport/lib/active_support/vendor.rb It defines required version of i18n too loose and this causes problem:
begin
gem 'i18n', '>= 0.1.3'
rescue Gem::LoadError
$:.unshift "#{File.dirname(FILE)}/vendor/i18n-0.1.3/lib"
end
Simple solution is to change version to more exact:
begin
gem 'i18n', '~> 0.1.3'
rescue Gem::LoadError
$:.unshift "#{File.dirname(FILE)}/vendor/i18n-0.1.3/lib"
end
- Status changed from Reopened to Closed
Pavel Valodzka wrote:
Same problem occures when newer version of i18n gem was installed in system.
This is known, solved in #6428 and has nothing to do with the OPs report, please open a new issue if you feel this is still a problem.
Also available in: Atom
PDF