Closed frconil closed 9 years ago
Thanks for reporting. This is happening because the helper module isn't being installed. I assume your env. is the same you reported in #12. I'll see if I can reproduce it.
CHeers.
Let me know if you need additional debug info.
Hi same error for me too.
I'm unable to reproduce the error using the same version of Redmine & Ruby. So theres something else about your environment, configuration, or data.
If it cannot find the method is_spent_on_shown then it's not loading the helper.
Is anyone experiencing this problem comfortable working with Ruby? Please try the below steps and let me know what you get:
You should see the error: /plugins/redmine_spent_time_in_issue_description/init.rb:21:in `block in <top (required)>': Loading IssueHelper (RuntimeError)
This confirms that Rails.configuration is running and should be trying to load the IssueHelper.
As requested:
./rbenvrun.sh rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
Loading IssueHelper
kernel/common/eval.rb:101:in `instance_exec'
kernel/bootstrap/array.rb:76:in `each'
kernel/common/code_loader.rb:243:in `require'
kernel/common/kernel.rb:705:in `require'
kernel/bootstrap/proc.rb:20:in `call'
kernel/bootstrap/array.rb:76:in `each'
kernel/bootstrap/array.rb:76:in `each'
kernel/bootstrap/array.rb:76:in `each'
kernel/common/kernel.rb:447:in `load'
kernel/delta/code_loader.rb:66:in `load_script'
kernel/delta/code_loader.rb:152:in `load_script'
kernel/loader.rb:649:in `script'
kernel/loader.rb:825:in `main'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
With --trace:
rake redmine:plugins:migrate RAILS_ENV=production --trace
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Loading IssueHelper
/var/vhost/dev-redmine/plugins/redmine_spent_time_in_issue_description/init.rb:20:in `__script__'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:517:in `_run__4545443411787390356__prepare__1338411874204908663__callbacks'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/application/finisher.rb:47:in `__script__'
kernel/common/eval.rb:101:in `instance_exec'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `run_initializers'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `initialize! (method_missing)'
/var/vhost/dev-redmine/config/environment.rb:14:in `__script__'
kernel/common/code_loader.rb:243:in `require'
kernel/common/kernel.rb:705:in `require'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/application.rb:103:in `require_environment!'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/railties-3.2.19/lib/rails/application.rb:305:in `initialize_tasks'
kernel/bootstrap/proc.rb:20:in `call'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:240:in `execute'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:179:in `invoke_with_call_chain'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rubysl-monitor-2.0.0/lib/rubysl/monitor/monitor.rb:211:in `synchronize (mon_synchronize)'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:201:in `invoke_prerequisites'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:178:in `invoke_with_call_chain'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rubysl-monitor-2.0.0/lib/rubysl/monitor/monitor.rb:211:in `synchronize (mon_synchronize)'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:106:in `top_level'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:106:in `top_level'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:78:in `run'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/gems/gems/rake-10.3.2/bin/rake:33:in `__script__'
kernel/common/kernel.rb:447:in `load'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.2.9/bin/rake:23:in `__script__'
kernel/delta/code_loader.rb:66:in `load_script'
kernel/delta/code_loader.rb:152:in `load_script'
kernel/loader.rb:649:in `script'
kernel/loader.rb:825:in `main'
Tasks: TOP => redmine:plugins:migrate => environment
And the modified code tidbit:
Rails.configuration.to_prepare do
require_dependency 'issue_helper_patch'
IssuesHelper.send :include, IssuesHelperPatch
end
raise "Loading IssueHelper"
and the result when restarting redmine:
Puma starting in single mode...
* Version 2.9.1 (rbx 2.1.0), codename: Team High Five
* Min threads: 8, max threads: 16
* Environment: production
! Unable to load application
Loading IssueHelper
I apologize it should have been in line 20 - inside the Rails.configuration call. I'm curious if that is running or not.
Are you able to reproduce this error from a fresh install of Redmine? No other plugins, default data, etc.
i tried both with the exact same result. I can try to load a default db to see if it still is an issue on a blank db.
OK, the plugin works in a default DB (using load_default_data) with no other plugins.
I'll try adding the plugins we have one by one until I find the one that is causing problems.
I found that the redmine_contacts ( http://www.redmine.org/plugins/redmine_contacts ) plugin is the one that prevents time_spent_in_description working.
Installing it triggers the issue. Subsequently removing it resolves it.
I'll see if I can figure what's causing it.
That link led me to http://redminecrm.com/projects/crm/pages/1. I downloaded and installed it from the Free Download link. No problems found but that may be from not actually using the plugin, just installing it.
If a plugin overrides issue show like mine does ( has app/views/issues/show.html.erb ) then it would cause a conflict.
Hi,
I don't think it overrides the issues views but I could be wrong:
plugins # find . -name "show.html.erb" -print
./redmine_contacts_helpdesk/app/views/helpdesk/show.html.erb
./redmine_contacts_helpdesk/app/views/public_tickets/show.html.erb
./redmine_contacts/app/views/deals/show.html.erb
./redmine_contacts/app/views/notes/show.html.erb
./redmine_contacts/app/views/contacts/show.html.erb
./redmine_agile/app/views/agile_charts/show.html.erb
I am using issue check list, I think it overrides issue
FrancoisMean are you refering to http://redminecrm.com/projects/checklist/pages/1?
They do not override the show.html.erb
Need to check but I think it is this one https://github.com/Undev/redmine_issue_checklist
The one from redminecrm is not compatible with the issue template plugin.
That doesn't override the show.html.erb page either. Look for ./app/views/issues/show.html.erb
None of my installed plugins override issues :(
Start with a fresh install of Redmine with default data/settings. Install the plugin and confirm that its working as expected. Then make it like your production instance step-by-step checking for success/failure.
When the plugin stops working it's indicating your previous step is where the conflict is happening.
I have the same issue.
It seems that the redmine_checklist plugin somehow has some problem with this plugin. (Maybe the both tried to chage the default issue function?)
I really love the ideas of the both plugins, and I hope they can work togother.
Good news is that I'm able to reproduce the error with https://github.com/Undev/redmine_issue_checklist and Redmine 2.6 with the redmine_spent_time_in_issue_description plugin.
So could you tell us what is the cause of this error please?
The error stops when I remove lines 21-23 of redmine_issue_checklist/patches/issues_controller_patch.rb. Specifically it's the IssuesController variable that triggers it.
The current guess is that I implemented the issue helper module as a patch when I should have just included into the controller.
I think I've got it fixed now. Would someone mind confirming so I can close this issue?
I'm gonna test this next week-end, I don't have ssh access to my server from work ;)
No problem for me, works fine :+1:
I have the same issue under redmine 2.5.3. Is this the same problem? how can i resolve it? Edit: I have upgrade our redmine to v2.6.3, uninstall the plugin and install again. still the same issue. when no time is added yet it does display the issue
Referring to https://github.com/TravisSpangle/redmine_spent_time_in_issue_description/issues/12 :
Hi,
I can access the config panel for the plugin after installing v2 of the plugin and running the necessary rake tasks (as per http://www.redmine.org/projects/redmine/wiki/Plugins) to remove the old version and install the new one, but now I get the following error when trying to display an issue: