jfqd / redmine_helpdesk

Lightweight helpdesk plugin for redmine.
MIT License
195 stars 101 forks source link

Ruby 2.2.x compatibility #110

Closed madwort closed 4 years ago

madwort commented 8 years ago

Hi, I was just baffled for quite a while with errors like this:

Started GET "/issues/2303" for 95.129.187.173 at 2016-02-09 16:10:08 +0000
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"2303"}
  Current user: tom (id=6)
  Rendered issues/_action_menu.html.erb (3.7ms)
  Rendered issue_relations/_form.html.erb (1.1ms)
  Rendered issues/_relations.html.erb (1.7ms)
  Rendered issues/_history.html.erb (13.9ms)
  Rendered issues/show.html.erb within layouts/base (37.8ms)
Completed 500 Internal Server Error in 84ms (ActiveRecord: 13.1ms)

ActionView::Template::Error (undefined method `send_to_owner' for #<Journal:0x007f98c487ba40>):
    17:     <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
    18:     </div>
    19:   </div>
    20:   <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
    21: <% end %>
    22: 
    23: <% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:167:in `call_hook'
  app/views/issues/_history.html.erb:20:in `block in _app_views_issues__history_html_erb__41389978711295228_70147053794480'
  app/views/issues/_history.html.erb:2:in `each'
  app/views/issues/_history.html.erb:2:in `_app_views_issues__history_html_erb__41389978711295228_70147053794480'
  app/views/issues/show.html.erb:124:in `_app_views_issues_show_html_erb___4475820901629156170_70147057062220'
  app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:115:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

on a fresh install of redmine-3.1.3. Downgrading from ruby-2.2.2 to ruby-2.1.6 appears to have fixed it for me.

ANemcov commented 8 years ago

Plugin work fine in my Environment: Redmine version 3.2.0.stable Ruby version 2.3.0-p0 (2015-12-25) [i686-linux] Rails version 4.2.5 Environment production Database adapter Mysql2

madwort commented 8 years ago

Hmm, I downgraded from redmine-3.2 as the README explicitly listed 3.0 and 3.1 but not 3.2... Maybe I'll try that.

"The latest version of this plugin is only compatible with Redmine 2.4.x, 2.5.x, 2.6.x, 3.0.x, 3.1.x."

madwort commented 8 years ago

Yep, for me: redmine-3.1 with ruby-2.1 works redmine-3.2 with ruby-2.2 FAILS redmine-3.2 with ruby-2.3 works

vilppuvuorinen commented 8 years ago

Could someone write set of tests demonstrating this behavior?

javango commented 8 years ago

More details, the database migrate command fails in redmine-3.2 with ruby-2.2

rake redmine:plugins:migrate RAILS_ENV=production

redmine/bin/rake:2: undefined method `require_relative' for main:Object (NoMethodError)