hicknhack-software / redmine_time_tracker

A time tracker plugin for Redmine
Other
106 stars 32 forks source link

Installation fails #124

Closed mikegr closed 10 years ago

mikegr commented 10 years ago

Redmine: 2.4.0 Ruby 1.8.7 redmine_time_tracker: 0.9

rake redmine:plugins:migrate RAILS_ENV=production 
(in /var/www/redmine)
rake aborted!
/var/www/redmine/plugins/redmine_time_tracker/app/helpers/time_trackers_helper.rb:66: syntax error, unexpected ':', expecting ')'
... l('date.month_names', locale: :en)[i])
                              ^
/var/www/redmine/plugins/redmine_time_tracker/app/helpers/time_trackers_helper.rb:67: syntax error, unexpected ':', expecting ')'
...ate.abbr_month_names', locale: :en)[i]) if matched.nil?
jume-dev commented 10 years ago

Could you do me a favor and try running this with a newer ruby version?

mikegr commented 10 years ago

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.

jume-dev commented 10 years ago

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

jume-dev commented 10 years ago

Fixed all hashes with new style i could find. Please report if you find any more.

mikegr commented 10 years ago

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'
jume-dev commented 10 years ago

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

mikegr commented 10 years ago

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? %>
jume-dev commented 10 years ago

thank you for your help