Nomethod Error causes 500 Internal error for plugin "Redmine Import Issues"
Added by Aravinth J over 9 years ago
How to solve that error.
logfile..
--------------------------------------------------------------------------------------------
Started GET "/redmine/projects/ph/import_issues" for 127.0.0.1 at 2015-08-20 14:45:15 +0530
Processing by ImportIssuesController#index as HTML
Parameters: {"project_id"=>"ph"}
Current user: redmine_eng1 (id=6)
Completed 500 Internal Server Error in 136.0ms
NoMethodError (undefined method `load_templates' for #<Class:0x3e7f840>):
activerecord (3.2.22) lib/active_record/dynamic_matchers.rb:55:in `method_missing'
plugins/redmine_import_issues/app/controllers/import_issues_controller.rb:34:in `index'
actionpack (3.2.22) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.22) lib/abstract_controller/base.rb:167:in `process_action'
-------------------------------------------------------------------------------------------
controller file.
-------------------------------------------------------------------------------------------
class ImportIssuesController < ApplicationController
unloadable
before_filter :find_project_by_project_id
before_filter :authorize
helper :custom_fields
include CustomFieldsHelper
helper :attachments
include AttachmentsHelper
include TimelogHelper
def index
@import = ImportAction.new
@trackers = @project.trackers
@templates = ImportAction.load_templates(@project)
@in_progress = [] # ImportAction.load_in_progress
end
def create
if params[:attachments].present?
@import = ImportAction.new(params[:import])
@import.project = @project
@import.user = User.current
@import.save_attachments(params[:attachments])
@import.save
if @import.check_file
redirect_to prepare_project_import_issue_path(@project, @import)
else
flash[:error] = l(:error_file_incorrect)
redirect_to project_import_issues_path(@project)
end
else
flash[:error] = l(:error_file_mandatory)
redirect_to project_import_issues_path(@project)
end
end
end
---------------------------------------------------------------
model file..
def self.load_templates(project)
ImportAction.where(:is_template => true, :project_id => project)
end
def self.load_in_progress
ImportAction.where(:status => 'in_progress')
end
Replies (1)
RE: Nomethod Error causes 500 Internal error for plugin "Redmine Import Issues" - Added by Aravinth J over 9 years ago
Error was fixed by installing gem "roo 2.1.1"