Forums » Development »
"Unable to autoload constant CLASS_NAME, expected FILE_PATH to define it" in development mode
Added by Haihan Ji over 8 years ago
I'm coding a plugin in redmine 3.2.1. If I change plugin's controller, helper, model , will cause the error.
I tried to change IssuesController, no error. So, I have to restart server to continue. It's terrible.
Any one can give me any advice?
(because Information Security of Company, I have to post this topic at home, so can't copy the track message.)
Replies (2)
RE: "Unable to autoload constant CLASS_NAME, expected FILE_PATH to define it" in development mode - Added by Ahmed Shalaby over 7 years ago
I have the same issue, whenever the code changes I get this error
LoadError (Unable to autoload constant Issue, expected /path/to/app/models/issue.rb to define it):
app/models/issue_query.rb:20:in `<class:IssueQuery>'
the only way to overcome this is to restart webrick
any explanation/advice is truly appreciated
RE: "Unable to autoload constant CLASS_NAME, expected FILE_PATH to define it" in development mode - Added by Javier Menéndez Rizo almost 7 years ago
The problem is related with this: Defect #20513
Removing this from yours controllers and models should fix the problem:
unloadable