Loriowar / redmine_issues_tree

Provides a tree view of the Redmine issues list
GNU General Public License v3.0
115 stars 72 forks source link

code syntax error on code branch 2.6.6 #9

Closed zoza1982 closed 8 years ago

zoza1982 commented 8 years ago

I am not able to start redmine after plugin installation. Apache passenger error logs reports syntax error

[ 2015-10-09 21:57:54.2601 2876/7f03d7d16700 age/Cor/App/Implementation.cpp:303 ]: Could not spawn process for application /var/www/redmine: An error occured while starting up the preloader. Error ID: 431f0d93 Error details saved to: /tmp/passenger-error-hu1rjg.html Message from application: /opt/redmine-2.6.7/plugins/redmine_issues_tree/lib/redmine_issues_tree/hook_listener.rb:3: syntax error, unexpected ':', expecting kEND partial: 'issues_trees/issues_index_header_tags' ^ /opt/redmine-2.6.7/plugins/redmine_issues_tree/lib/redmine_issues_tree/hook_listener.rb:5: syntax error, unexpected ':', expecting kEND partial: 'issues_trees/link_to_tree_view' ^ /opt/redmine-2.6.7/plugins/redmine_issues_tree/lib/redmine_issues_tree/hook_listener.rb:7: syntax error, unexpected ':', expecting kEND partial: 'issues_trees/link_to_plain_view' ^ (SyntaxError)

Loriowar commented 8 years ago

Looks like you have very very old Ruby version. I check branch 2.6.6 again and it works perfect. I guarantee works of plugin with Ruby 1.9.3 or greater. Try to replace

  render_on :view_issues_index_header,
            partial: 'issues_trees/issues_index_header_tags'
  render_on :view_issues_index_contextual,
            partial: 'issues_trees/link_to_tree_view'
  render_on :view_issues_tree_index_contextual,
            partial: 'issues_trees/link_to_plain_view'

on

  render_on :view_issues_index_header,
            :partial => 'issues_trees/issues_index_header_tags'
  render_on :view_issues_index_contextual,
            :partial => 'issues_trees/link_to_tree_view'
  render_on :view_issues_tree_index_contextual,
            :partial => 'issues_trees/link_to_plain_view'

in hook_listener.rb. There is a high probability what this helps you.

zoza1982 commented 8 years ago

Thanks for help. I upgraded to ruby to 1.9.3 via rvm and works like a charm now. Not sure why these CentOS 6.5's are still shipping with dinosaur version of ruby.

Loriowar commented 8 years ago

You welcome! Glad to help.