IntelliJ 13 New variant of No Grails project

I would like to create a new Grails project in IntelliJ 13.

I have IntelliJ 13. I have Grails.

I don't see the Grails option in the New Project dialog.

How do I configure IntelliJ 13 so that there is a Grails option in the New Project dialog?

IntelliJ 13 New Project Dialog without Grails option

When I choose Groovy, I get a missing library error. Grails was installed in my home directory ~/.grails

using the GVM.

enter image description here


source to share

8 answers

Pay attention to the IntelliJ version you are using. The Community version supports Groovy but does not support Grails; the Ultimate version supports Grails and many frameworks



You select the wrong (java) option, you need to select groovy in the left menu bar and then you will see the grails option.



My Newell Dialog now has a Grails option, although I'm not sure what it is.

Here are some of the things I've done:

On the command line, in an already existing Grails project, I ran:

grails integrate-with --intellij


Then I opened the project (which involved migrating the legacy version of the IntelliJ project that Grails created for IntelliJ 13)

There was a green box in the upper right corner of the project window that complained that the Grails SDK was not configured. This box disappeared before I could click on the link inside it to try and fix the problem.

I closed the project and reopened it, hoping that the green box would reappear. This is not true. But a red box appeared that complained that the Java SDK was not configured properly.

In the Project Structure dialog box, I configured the Java SDK.

I closed my Grails project and then tried to create a new Grails project. This time the Groovy option had the Grails option.

IntelliJ New Project Dialog with Grails option

But I think it is still a problem because the dialog displays No library selected

for Groovy.

Groovy is included as part of Grails, so maybe I should click the New ... button and select the Groovy installation to be packaged into the Grails installation? But this looks like what I would expect IntelliJ to auto-configure when linked with a Grails installation.



Have you enabled the Grails plugin in the IDE? Go to File> Preferences> Plugin and check the grails setting, restart the IDE.



You can create grails project via terminal (grails create-app ...) and just import project (or new -> from existing sources) from Idea. Than you should choose "import project from external model -> gradle (or maven)". And your project is ready! I think this will help you.



Grails is only supported in the Ultimate version of IntelliJ IDEA. It is not supported in the community edition.

You can try the Ultimate version for free for 30 days before it goes into mode where you can only work for 15 minutes until you stop / close everything you are doing and reopen the IDE.



I am assuming you are using the community version of IntelliJ IDEA which does not provide any way to create a grails app. But this does not mean that you are not allowed to create a grails project.

Use the command line to create a new Grails project,

grails create-app YourAppName

this will create the grails app in your current working directory. Then just run the application using the following command

grails run-app

this will resolve all dependencies and run your application.

Now open IntelliJ IDEA and download this app from the current working directory and then follow the instructions and this.

The only drawback to using this method is that suggestions and autocomplete will not work, the GSP pages will be unrecognized. If you need these features, head over to the Ultimate Edition IntelliJ IDEA.



You need the Ultimate version of IntelliJ not Community in order to use Groovy / Grails.



All Articles