Git error

Am getting following error:

| Loading Grails 2.2.3
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory (Use --stacktrace to see the full trace)

I already tested git from settings to make sure full path is defined as well tested it using test button. I'm using IntelliJ12 on Mac 10.8.4

Any help will be highly appreciated.

-Deep

6 comments
Comment actions Permalink

Try to add --stacktrace to Grails Run Configuration to see full stack trace.

0
Comment actions Permalink

This is what I'm getting with stacktrace:

| Loading Grails 2.2.3
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.io.IOException: Cannot run program "git": error=2, No such file or directory
 at BuildConfig.run(BuildConfig.groovy:9)
 at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1050)
 at grails.util.BuildSettings$loadConfig.callCurrent(Unknown Source)
 at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1028)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.io.IOException: error=2, No such file or directory
 ... 5 more
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory

Process finished with exit code 1

0
Comment actions Permalink

So the problem is in BuildConfig.groovy:9. What is the code in BuildConfig.groovy line 9?

0
Comment actions Permalink

grails.project.war.file = "target/${appName}-${appVersion}-${Environment.current.name}-${"git rev-parse --short HEAD".execute().text.replace('\n', '')}.war"


If I provide full git path then it is works but I've already given path in perference -> version control -> git
0
Comment actions Permalink

Try to run "grails war" in command line. Does it work correct?

0
Comment actions Permalink

Yes, command line is working fine.

0

Please sign in to leave a comment.