Closed mikegr closed 10 years ago
Could you do me a favor and try running this with a newer ruby version?
Ruby 1.9 introduced a new hash syntax. So redmine_time_tracker should add the requirement Ruby 1.9. Redmine 2.4.0 still supports 1.8.7.
Ah you're right, totally forgot about that. Normally i tried to use the old syntax to preserve compatibility, just missed a few spots, as it seems.
EDIT: we will gonna fix it soon, instead of just upgrading the requirements
Fixed all hashes with new style i could find. Please report if you find any more.
I think there are further problems with the new syntax. The migration worked, but at runtime I get these errors. I have used the master branch of today.
Last commit was
commit 28c165ef9cc22ee6bbb00e01d772c4f0729ba42d
Author: Robert Kranz <robert.kranz@hicknhack-software.com>
Date: Thu Nov 21 09:10:17 2013 +0100
Processing by WelcomeController#index as HTML
Current user: anonymous
Rendered welcome/index.html.erb within layouts/base (2.4ms)
Rendered plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb (1.0ms)
Completed 500 Internal Server Error in 15.0ms
ActionView::Template::Error (compile error
/var/www/redmine/plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb:28: syntax error, unexpected ':', expecting ')'
...ffer.append= ( render partial: 'time_trackers/activity_dialo...
^
/var/www/redmine/plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb:28: syntax error, unexpected ',', expecting ')'
...ime_trackers/activity_dialog', locals: {time_tracker: time_t...
^
/var/www/redmine/plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb:28: odd number list for Hash
...ialog', locals: {time_tracker: time_tracker, stop_title: sto...
^
/var/www/redmine/plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb:28: syntax error, unexpected ':', expecting '='
...ker: time_tracker, stop_title: stop_title, remote: false } i...
^
/var/www/redmine/plugins/redmine_time_tracker/app/views/time_trackers/_assets.html.erb:28: syntax error, unexpected ':', expecting '='
...top_title: stop_title, remote: false } if !time_tracker.nil?...
^):
25: });
26: </script>
27:
28: <%= render partial: 'time_trackers/activity_dialog', locals: {time_tracker: time_tracker, stop_title: stop_title, remote: false } if !time_tracker.nil? and !time_tracker.is_activity_id_correct_set? %>
lib/redmine/hook.rb:111:in `send'
lib/redmine/hook.rb:111:in `view_layouts_base_html_head'
lib/redmine/hook.rb:61:in `send'
lib/redmine/hook.rb:61:in `call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:158:in `call_hook'
app/views/layouts/base.html.erb:14:in `_app_views_layouts_base_html_erb__1399152777_70361522917300'
ok, did a new look at it and found way more new hash style. hopefully all now. Please try the newest version and report, if everything works now
Hi, I found another very small necessary change and fixed it. It works with this change.
app/views/time_trackers/_issue_action_menu.html.erb
-<%= render :partial => 'time_trackers/start_dialog', :locals => {time_tracker: time_tracker} if !display_stop && allowed_to_start && !time_tracker.nil? %>
+<%= render :partial => 'time_trackers/start_dialog', :locals => {:time_tracker => time_tracker} if !display_stop && allowed_to_start && !time_tracker.nil? %>
thank you for your help
Redmine: 2.4.0 Ruby 1.8.7 redmine_time_tracker: 0.9