thomasklein / redmine2mite

Redmine2mite connects your Redmine account with your mite.account. Track your time easily on issues within Redmine and get them automatically send to mite.
http://mite.yo.lk/
MIT License
13 stars 6 forks source link

Error 500 regarding 'url_for' when using Git and/or Hudson #12

Closed arnekolja closed 11 years ago

arnekolja commented 12 years ago

I found a strange problem today. When redmine2mite is enabled my current installation throws error 500's whenever accessing a git-enabled project's settings or a "hudson" tab (hudson/jenkins plugin). It does only occur when redmine2mite is loaded.

Here are both errors:

Processing HudsonController#index (for xx.xx.xx.xx at 2012-02-15 17:36:40) [GET]
  Parameters: {"action"=>"index", "id"=>"projx", "controller"=>"hudson"}
Rendering template within layouts/base
Rendering hudson/index

ActionView::TemplateError (can't convert Symbol into Hash) on line #38 of vendor/plugins/redmine_hudson/app/views/hudson/index.rhtml:
35:     <div class="contextual latest-build" id='latest-build-<%=job.name%>'>
36:       <%=job.latest_build.error if "" != job.latest_build.error%>
37:       <% if "" == job.latest_build.error %>
38:         <% if "" != job.latest_build.number %>
39:           <%=image_tag 'document.png', :class=>'icon-build-history', :id=>"build-history-#{job.name}", :title=>l(:label_show_build_history)%>
40:           <%=image_tag("#{@hudson.settings.url}images/16x16/package.gif", :class=>"icon-build-artifacts", :id=>"build-artifacts-#{job.name}") unless job.latest_build.artifacts.empty? %>
41:           <%=link_to "##{job.latest_build.number}", job.latest_build.url_for(:user)%>

    vendor/plugins/redmine_hudson/app/models/hudson_build.rb:57:in `url_for'
    vendor/plugins/redmine_hudson/app/views/hudson/index.rhtml:38:in `_run_rhtml_vendor47plugins47redmine_hudson47app47views47hudson47index46rhtml'
    vendor/plugins/redmine_hudson/app/views/hudson/index.rhtml:24:in `each'
    vendor/plugins/redmine_hudson/app/views/hudson/index.rhtml:24:in `_run_rhtml_vendor47plugins47redmine_hudson47app47views47hudson47index46rhtml'
    vendor/plugins/redmine_hudson/app/controllers/hudson_controller.rb:32:in `index'
    vendor/plugins/redmine_hudson/app/controllers/hudson_controller.rb:31:in `index'
    /usr/lib/ruby/1.8/rack/adapter/rails.rb:74:in `call'
    /usr/lib/ruby/1.8/thin/connection.rb:76:in `pre_process'
    /usr/lib/ruby/1.8/thin/connection.rb:74:in `catch'
    /usr/lib/ruby/1.8/thin/connection.rb:74:in `pre_process'
    /usr/lib/ruby/1.8/thin/connection.rb:57:in `process'
    /usr/lib/ruby/1.8/thin/connection.rb:42:in `receive_data'
    /usr/lib/ruby/1.8/eventmachine.rb:257:in `run_machine'
    /usr/lib/ruby/1.8/eventmachine.rb:257:in `run'
    /usr/lib/ruby/1.8/thin/backends/base.rb:57:in `start'
    /usr/lib/ruby/1.8/thin/server.rb:156:in `start'
    /usr/lib/ruby/1.8/thin/controllers/controller.rb:80:in `start'
    /usr/lib/ruby/1.8/thin/runner.rb:174:in `send'
    /usr/lib/ruby/1.8/thin/runner.rb:174:in `run_command'
    /usr/lib/ruby/1.8/thin/runner.rb:140:in `run!'
    /usr/bin/thin1.8:6

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)

and

Processing ProjectsController#settings (for xx.xx.xx.xx at 2012-02-15 17:41:50) [GET]
  Parameters: {"action"=>"settings", "id"=>"projx", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/settings

ActionView::TemplateError (Missing host to link to! Please provide :host parameter or set default_url_options[:host]) on line #19 of app/views/projects/settings/_repository.rhtml:
16: <% button_disabled = true %>
17: <% if @repository %>
18: <%   button_disabled = ! @repository.class.scm_available %>
19: <%=    repository_field_tags(f, @repository)%>
20: <% end %>
21: </div>
22: 

    (eval):21:in `root_url'
    app/helpers/repositories_helper.rb:228:in `git_field_tags'
    app/helpers/repositories_helper.rb:154:in `send'
    app/helpers/repositories_helper.rb:154:in `repository_field_tags'
    app/views/projects/settings/_repository.rhtml:19:in `_run_rhtml_app47views47projects47settings47_repository46rhtml_locals_object_repository_tab'
    app/views/projects/settings/_repository.rhtml:1:in `_run_rhtml_app47views47projects47settings47_repository46rhtml_locals_object_repository_tab'
    app/views/common/_tabs.rhtml:24:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/views/common/_tabs.rhtml:23:in `each'
    app/views/common/_tabs.rhtml:23:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/helpers/application_helper.rb:218:in `render_tabs'
    app/views/projects/settings.rhtml:3:in `_run_rhtml_app47views47projects47settings46rhtml'
    /usr/lib/ruby/1.8/rack/adapter/rails.rb:74:in `call'
    /usr/lib/ruby/1.8/thin/connection.rb:76:in `pre_process'
    /usr/lib/ruby/1.8/thin/connection.rb:74:in `catch'
    /usr/lib/ruby/1.8/thin/connection.rb:74:in `pre_process'
    /usr/lib/ruby/1.8/thin/connection.rb:57:in `process'
    /usr/lib/ruby/1.8/thin/connection.rb:42:in `receive_data'
    /usr/lib/ruby/1.8/eventmachine.rb:257:in `run_machine'
    /usr/lib/ruby/1.8/eventmachine.rb:257:in `run'
    /usr/lib/ruby/1.8/thin/backends/base.rb:57:in `start'
    /usr/lib/ruby/1.8/thin/server.rb:156:in `start'
    /usr/lib/ruby/1.8/thin/controllers/controller.rb:80:in `start'
    /usr/lib/ruby/1.8/thin/runner.rb:174:in `send'
    /usr/lib/ruby/1.8/thin/runner.rb:174:in `run_command'
    /usr/lib/ruby/1.8/thin/runner.rb:140:in `run!'
    /usr/bin/thin1.8:6

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)
thomasklein commented 12 years ago

Hi Arnekolja! I can not reproduce that error. Could you please try the most recent version of the plugin? If this does not work, could you tell if deactivating the "hudson tab" - Plugin lets the Redmine2mite plugin operate normally?

thomasklein commented 11 years ago

Hi Arnekolja! Does this error happen still with the new version of the redmine2mite plugin?

thomasklein commented 11 years ago

Closed as I don't know if it is still relevant for the newest version of Redmine and the plugin.