简体   繁体   中英

Why doesn't Grails 2.4.5 version work when I try to see it's version and create a Application?

The current project I work on uses Groovy version 2.3.11 and Grails in version 2.4.5.

Everything went very well with the installation of Groovy. However, when I installed grails in the aforementioned version and ran the "grails -version" command, my terminal simply didn't show anything - (I'm using Ubuntu on version 18.04.5).

Still, I tried to test grails by creating an application, but nothing worked. When I changed the version of grails to 4.0.4, I was able to do everything normally.

I have already uninstalled and reinstalled manually and it didn't work. The problem persists.

I also tested versions 2.4.4 and 2.5.0 and the error is the same as the one for version 2.4.5. This problem doesn't happen, however, from version 3.0.0 on.

I tried this link too ( Grails not working on Ubuntu ) where in the first time worked (I got it create a HelloWorld application runing this command "grails create-app helloWorld") So, a deleted all and It tried again but, in the second time not worked.

Can someone help me?

The problem was the environment variable that wasn't set when I ran the command "export PATH =" $ PATH: $ GRAILS_HOME / bin" in my terminal.

I found that out by opening a new terminal and running the command echo $ PATH. I realized, the settings didn't change at all.

After this, I tried changing the settings on the bachrc file itself, according to the steps described on the following link: https://askubuntu.com/questions/554664/path-not-saved-as-i-login-again . Besides that, I set the JAVA_HOME and GROOVY_HOME in that file too.

Now everything works normally.

Lesson learned: Always check if your PATH was actually set as desired, by opening a new terminal and running "echo $PATH"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM