user1870829
user1870829

Reputation:

Cannot run Grails from command prompt

I’ve added a GRAILS_HOME environment variable, which points to the folder in which I extracted the Grails distribution zip, and I’ve added %GRAILS_HOME%\bin to my path. Yet after I open a new command prompt, the “grails” command is still not found. Does anyone have any clue as to why this is happening?

I’m running Grails 2.2 on Windows 7.

Upvotes: 0

Views: 3449

Answers (5)

Igors
Igors

Reputation: 812

I have the same problem on Windows 7 64 bit and Grails version 2.*

By removing local neither maven repository nor installed plugins repository doesn't help. I found - just set properties of %GRAILS_HOME%/bin/grails.bat and startGrails.bat as Run in compatibility mode: Windows XP (Service Pack 3).

To do that You need to have local PC Administrators rights.

/igors

Upvotes: 2

Random Joe
Random Joe

Reputation: 640

You might want to check the bin folder of your grails installation. The grails.bat file could be missing. I had this problem today and solved it by downloading the zip file again.

Upvotes: 0

user1811107
user1811107

Reputation: 759

Do the following.

  1. Go to your command prompt, execute the Path command. If everything has been set right your paths should show up as complete paths starting with C:... If the paths show up with the % sign that means your paths need to be set correctly. I did noticed that in your example you have used the forward slash - I am assuming that is a typo, because that will be a problem.

  2. Another way to trouble shoot the issue is CD to the location C:\Grails\bin, execute the command grails.bat, if it executes you are in a good place that means you have to tweak your paths - following this path might give you a clue about other issues....

Upvotes: 0

Yamir Encarnacion
Yamir Encarnacion

Reputation: 786

Maybe you are experiencing [STS-2530] Problem deploying Grails App if workspace path has a space. Jira shows the issue as resolved but it would not hurt to check that you do not have a space in your workspace path as it my trip up grails.

Upvotes: 0

rsijaya
rsijaya

Reputation: 169

have you create JAVA_HOME in there?

Upvotes: 0

Related Questions