Michael
Michael

Reputation: 33297

org.codehaus.groovy.grails.cli.support.GrailsStarter not found error

After updating from Grails 2.3.10 to 2.3.11 and updating the path variable to

export GRAILS_HOME=/Applications/grails/grails-2.3.11

When I run: grails I get the following error:

Error: Main class org.codehaus.groovy.grails.cli.support.GrailsStarter could not be found

Upvotes: 9

Views: 17020

Answers (8)

Tung
Tung

Reputation: 1671

The question and answers seems to be out-of-date. I have encountered the same problem but it has been fixed by replying the discussion here. The easiest way to resolve the issue is to run the following command:

chmod +x .sdkman/bin/sdkman-init.sh

which helped me out.

Upvotes: 1

YRP
YRP

Reputation: 55

I ran the below commands: 1. To set path to contain jdk 1.8.0_144 bin folder & Grails bin folder. 2. Set JAVA_HOME to jdk1.8.0_144 3. set GRAILS_HOME to Grails-2.4.3 folder.

And it worked !!!

Upvotes: 0

sgiri
sgiri

Reputation: 701

Solution:

Make sure you have environment variable set correctly.

  1. Go to grails/bin folder $cd /Applications/grails/grails-2.3.11/bin
  2. Then run grails from command line $./grails

When you run this command, necessary files for your grails will be downloaded.

  1. Close your terminal
  2. Now check your grails version from terminal $grails -version

There won't be any errors.

Upvotes: 6

Florian Popa
Florian Popa

Reputation: 11

You must update your jdk version. I was using jdk1.8.0_11 and it resolved with jdk1.8.0_45.

Upvotes: 0

Shastings
Shastings

Reputation: 167

I'm using Grails installed with GVM, and I've also run into this issue after updating environment variables in the profile and sourcing in the new changes. I was able to fix the problem simply by closing and reopening the terminal.

Upvotes: 0

Dan
Dan

Reputation: 43

You could just use gvm to install your version then use it to manage your versions.

Upvotes: 0

Michael
Michael

Reputation: 33297

I found the solution. If you go to the grails/bin folder and run grails from the command line you can close the console afterwards and when you open the console again the problem will be fixed.

Upvotes: 14

Martin Hauner
Martin Hauner

Reputation: 1733

You are probably still running grails 2.3.10.

You have to update GRAILS_HOME and you also have to update your path to use the new grails version, i.e. your path must include $GRAILS_HOME/bin.

Upvotes: 4

Related Questions