IcedDante
IcedDante

Reputation: 6842

IntelliJ Grails 3 Project: Unable to Run Grails project

I recently installed IntelliJ onto my machine after many unsuccessful attempt to get GGTS working reliably. So far the error messages were clear and easy to resolve after I imported my Grails project. GGTS had forced me to downgrade from Grails 3 to 2 because, at the time, GGTS does not seem to support Grails 3. I ran into issues after pointing IntelliJ to Grails 3, but restarting IntelliJ seemed to fix those problems. Now, however, I can't get my project to start and I get the following error:

"C:\Program Files\Java\jdk1.8.0_51\bin\java" ...;C:\dev\grails-3.0.4\lib\xalan\serializer\jars\serializer-2.7.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.grails.cli.GrailsCli run-app
Error |
Problem updating profiles from origin git repository (Use --stacktrace to see the full trace)
Error |
Could not checkout tag for Grails release [3.0.4]: repository not found: C:\Users\Randeep\.grails\repository (Use --stacktrace to see the full trace)
Error |
Error occurred running Grails CLI: No profile found for name [web]. (Use --stacktrace to see the full trace)

Process finished with exit code 1

Note the "Problem updating profiles from origin git repository" message. This is a git project, but I don't know why IntelliJ is trying to do any git operations (I don't want it to, I just want it to run my project).

Upvotes: 8

Views: 8499

Answers (4)

Missy Williams
Missy Williams

Reputation: 71

I stumbled across this question when my Grails 3.2.8 app was reporting a similar problem for react.

Error occurred running Grails CLI: No profile found for name [react]

I do not have a .grails/profile folder, for whatever reason, and didn't want to trash the whole .grails folder right off the bat, so I ended up :

  1. reimporting my project into the IDE
  2. refreshed the grails dependencies
  3. cleaned the grails project

and it worked for me.

Upvotes: 0

IcedDante
IcedDante

Reputation: 6842

There's a lot going on behind the scenes with grails here. The CLI (command line interface) is trying to load a profile called web. Basically grails creates a .grails folder in your home directory that contains a set of default profiles (see ~/.grails/repository/profiles).

Somehow this folder got corrupted or modified on my system and the web profile, which is the default profile, disappeared. To fix this I simply deleted the .grails folder from my home directory, ran grails, and it regenerated.

Edit: Deleting your .grails folder may have undesirable behavior if other projects are using data within it, so try deleting the profiles folder first.

Upvotes: 8

ressol
ressol

Reputation: 31

I got this error message too after I delete ~/.grails ~/.gradle from my home directory.

Thoses directories seems won't created again for some reason, and grails clean isn't work at the same time.

This how I fixed it, hope it helps.

  1. set up JAVA_HOME / GRAILS_HOME variables.
  2. cd GRAILS_HOME (ie. /etc/grails/grails-3.1.4 )
  3. execute 'bin/grails'
  4. create-profile web
  5. grails will try to create a new web profile, and start downloading dependency jars.
  6. exit. & done.

ps. my environment.

  • jdk 1.7.0_4
  • grails 3.1.4

Upvotes: 2

biniam
biniam

Reputation: 8199

IntelliJ is trying to download a Grails profile called 'web' and it is unable. Enable --stacktrace and dig into the problem. Or Create a new project in IntelliJ and point it to your source. Note: Your project should be a Grails 3.0.X to use profiles.

Upvotes: 0

Related Questions