Tutorial :grails console execution error



Question:

Environment

  • Grails 1.2.2
  • Ubuntu 9.10
  • IntelliJ 9.0.3

Everything works fine in IntelliJ. When I execute "grails console" in the project root I get the following

Error executing script Console: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed, SimpleTemplateScript1.groovy: 2: illegal string body character after dollar sign;                                solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 2, column 10.                                                                                                    1 error      


Solution:1

Figured it out! In the scaffolding directory the file "Controller.groovy" somehow made its way there. Removing this file solved the problem. Lesson learned - when seeing a template parsing error look closely at the templates directory.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »