Sdkman-cli: Stop! grails is not a valid candidate.

Created on 17 Dec 2014  路  6Comments  路  Source: sdkman/sdkman-cli

I saw a similar issued opened for this error before #259

It seems that after installing jenv my gvm is no longer working:

~ $ echo $JAVA_HOME

~ $ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
~ $ which java
/Users/omnipresent/.jenv/shims/java
~ $ echo $GROOVY_HOME
/usr/share/groovy
~ $ groovy -version
groovy: JAVA_HOME environment variable is not set
Groovy Version: 2.0.5 JVM: 1.8.0_25 Vendor: Oracle Corporation OS: Mac OS X
~ $ gvm use grails 2.4.4

Stop! grails is not a valid candidate.

My bash_profile looks like this

. ~/.bashrc                                                                                                         

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

#THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
[[ -s "/Users/omnipresent/.gvm/bin/gvm-init.sh" ]] && source "/Users/omnipresent/.gvm/bin/gvm-init.sh"

I think the issue is this: jenv is taking over my grails??

~ $ which grails
/Users/omnipresent/.jenv/shims/grails

Most helpful comment

be sure the code executed

export SDKMAN_DIR="$HOME/.sdkman" && source "$HOME/.sdkman/bin/sdkman-init.sh"

All 6 comments

This all went away after deleting & reinstalling GVM

be sure the code executed

export SDKMAN_DIR="$HOME/.sdkman" && source "$HOME/.sdkman/bin/sdkman-init.sh"

My error disappeared after upgrading to sdk latest version.

solved by
sdk selfupdate force

We've had an issue with candidate cache not being refreshed properly. This is now fixed in the beta channel and will roll out to stable soon.

@Tinker-S your suggestion worked for me. Thanks!

Was this page helpful?
0 / 5 - 0 ratings