Reputation: 33297
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
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
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
Reputation: 701
Solution:
Make sure you have environment variable set correctly.
$cd /Applications/grails/grails-2.3.11/bin
$./grails
When you run this command, necessary files for your grails will be downloaded.
$grails -version
There won't be any errors.
Upvotes: 6
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
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
Reputation: 43
You could just use gvm
to install your version then use it to manage your versions.
Upvotes: 0
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
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