Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ 12 Grails 2.1 Configuration - Grails SDK not configured

I feel like I'm missing something simple at this point. I upgraded to grails 2.1.1 from 1.3.7 while running IntelliJ 10, recently I upgraded to IntelliJ 12 and imported all settings. Somehow in the project in IntelliJ 12, I have no grails SDK.

My Global Library has grails 2.1.1 defined with all the correct .jars included, however, the Tools menu is missing the "Grails" sub-menu, and attempting to run the app gives the error message that Grails SDK is not configured.

If I create a new project for grails, the SDK configures correctly and Grails shows in the Tools menu. What am I missing preventing me from adding the Grails SDK to this project? Thank you, community, for your time and suggestions.

like image 682
Trebla Avatar asked Feb 07 '13 17:02

Trebla


People also ask

How do I add Grails in IntelliJ?

Support for the Grails framework is not bundled with IntelliJ IDEA. You can install the Grails plugin from the JetBrains repository as described in Install plugins. The latest compatible version of IntelliJ IDEA is 2021.3. You can find the documentation for Grails support in earlier versions of IntelliJ IDEA Help.

How do I change my Grails version in IntelliJ?

I right clicked on the application and went to Grails -> Change SDK Version. I chose the version I wanted, then IDEA asked me if I wanted to upgrade the application. Clicked yes and all was good.


1 Answers

You do not have to create a new project.

Had the same problem, and it took me quite some search to resolve it:

  • right click your Grails module
  • click "Add framework support"
  • select "Groovy"
  • The dropdown next to "Use library" will allow you to choose a grails library.
  • If the dropdown is empty press "create" and choose your grails library directory.
  • Grails SDK is configured then

Add framework support

select grails library

like image 100
peterp Avatar answered Sep 24 '22 17:09

peterp