Augusto Escobar
Augusto Escobar

Reputation: 36

Running Grails 3 app on Intellij

I created a default Grails 3 app using the following commandline:

$ grails create-app myapp --profile web --features mongodb,asset-pipeline

And then, I opened the project in IntelliJ IDE 2016.1.

In the first time, the app started correctly. But, I cannot run it anymore due to the following error:

Error running Grails: myapp: Grails application is not found.

I tried to reconfigure the running configurations, but my project is not in the list at all, as shown in the following figure:

IntelliJ Project configuration

Can anybody help me, please?

Upvotes: 0

Views: 1513

Answers (1)

guanche
guanche

Reputation: 61

To restore sanity to IntelliJ configuration files, the simplest solution on Grails > 3 is to let gradle do the work for you. First close the project in Intellij, then from a *sh shell cd to your project directory and run 'gradle cleanIdea idea'. Reopen the project in IntelliJ. If you were able to start your app with 'grails run-app,' you should now be able to run the app again from within IntelliJ Idea. This works for me whenever IntelliJ starts displaying the same 'no Grails application' message on opening a project.

Upvotes: 1

Related Questions