grails run-app > can't see terminal input - grails

On Ubuntu 12.04, when I run grails run-app, after stopping the app, the terminal cursor doesn't move when typing, and no text appears. I can still type commands, but I have to either do it blindly or use reset to reset the terminal. Has anyone else seen this behavior? Ive tested in grails 2.0.1, 2.0.4, 2.1.2 and 2.2.1. The same behavior happens for all. Any suggestions?

grails --plain-output run-app should disable the use of ANSI colour codes, which might help, depending on which terminal program you're using.

Related

Unable to use Grails 3.0.9 version

I am working on Windows. I am trying to use Grails 3.0.9 version. Previously, I used Grails 2.4.2, everything worked well.
After Downloading and setting windows environment for 3.0.9 of Grails, I typed 'grails help' or 'grails create-app test' on Windows cmd.
It always tell 'Error: Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter'
Then I try to use 3.0.8, it told the same error. But if I switch to use 2.4.2, it works normally.
Ps. On Grails 3.0.9, I use jdk1.8.0_65.
What I did wrong or what I missed for setting for a new version of Grails.
Thanks.
I Had exactly the same problem. You could try that:
Open a new CMD window and print your variables (PATH, GRAILS_HOME) if set.
Sometimes my variables still referenced my Grails 2.3.7 library and not 3.0.8 which I wanted to use.
That was happening on Windows 10 to me. After a few restarts from CMD all went well. Maybe System variables are somehow cached and not set immediately.
I would recommend using gvm on windows, its a tool to install, switch grails very quickly using windows powershell
its now called sdkman http://sdkman.io/
if your installing on mac or or unix like os
https://github.com/flofreud/posh-gvm has a good tutorial on installing for windows
gvm install grails 3.0.9 , you can set it as the default by saying yes at the end or
gvm use grails 3.0.9
gvm list grails to see what other versions of grails are available to install.
then type grails -version to see what version is installed and test out grails
your grails create-app should then work

ggts null pointer "Retrieving available scripts"

I installed a fresh copy of GGTS on a fresh copy of windows 8 with JDK 1.7 installed.
I tried to get it to compile my existing project which was based on 2.3.6 and it failed miserably as GGTS comes with grails 2.4.2.
I know serveral people who had problems with 2.4.x so decided to stick with 2.3.
So I downloaded 2.3.11 (latest 2.3) and created a GRAILS_HOME pointing to 2.3.11 dir, and JAVA_HOME pointing to the root of the JDK.
On command line, I can now type grails - version and get back 2.3.11.
I restarted GGTS, and deleted the project and createde it again, adding 2.3.11 as a new Grails version, and set the project to use that.
It fails to compile, saying version is wrong. Fair enough. But when I try to launch the command line from GGTS using the gree circular button at the top which looks like 3 cups, it says:
Retrieving available scripts
Retrieving available scripts
An internal error occurred during: "Retrieving available scripts".
java.lang.NullPointerException
Any ideas?
In my case the problem was, that I had moved grails to a different folder. I just had to change the location of grails in the settings. Hope that helps somebody.
check all grails-project's 'app.grails.version' in application.properties, then open window - preferences - groovy -grails, make sure that all VERSIONs were defined ( I use sts, maybe a little difference ).
alternatively
update all application.properties set app.grails.version=2.3.11 ( the version your ggts defined )
Check if your environment variable of GRAILS_HOME is set to the right version of Grails.
I ran into this same issue, and the problem was caused by the Grails installation it was trying to use. It wanted to use the default version that comes with GGTS rather than the one I installed myself.
To fix, go to Window > Preferences > Groovy > Grails, then "Edit" the Grails installation it shows. I had to switch mine from C:\ggts-bundle\grails-2.4.4\ to C:\grails-2.4.2\.

Running Groovysh in Grails Application does not accept input

I'm trying to find a Pry Deubgger equivalent on Groovy.
I found a good enough project named groovy-debugger and updated it's dependencies to run against groovy 2.3.1 which comes with Grails 2.4.0.
If I open a groovysh just a blinking cursor will be shown which does not accept any input.
I tried to get the input stream and output stream of a current grails console, but it does not help.
Anyone can help me setup my beloved REPL-driven development environment on Groovy.
So using Grails 2.4.0 I created a new project and started the shell with grails shell and it was able to accept input with no problem. This is with Mac OS X. What operating system are you running?

Grails 2.3 & GGTS 3.4 stop button not working

How to stop grails processes in GGTS 3.4 with grails 2.3. the stop button of GGTS is not stopping the server running and the java.exe processes are still showing in task manager.
Comment the grails.project.fork = [ .. ] part of your BuildConfig.groovy file.
This part enables running run-app, test-app and war in different threads(so you don't have to stop one to start the other), and it seems ggts isn't successfully destroying the thread right now.
For reference, here is the related issue in the ggts bug tracker https://issuetracker.springsource.com/browse/STS-3522
Can you try to disable the "Keep external Grails running" option in Eclipse Preferences -> Groovy -> Grails -> Grails Launcher?
Unchecking the "Keep external Grails running" does not work for me. What I do is to hit the "Grails Command History" icon and type "stopApp" (or pick stopApp if previously typed). Once this commands finishes executing, then you can stop the Grails application using the stop button.
Using Groovy Grails Tool Suite GGTS 3.4.0 on windows 64x. For my simple projects, the stop button works. For a bigger complex project, it does not. I use the "stop-app" (opposite of "run-app"). See: 2.8 Running an Application in the getting started guide. I think that in older versions of Grails ( < 2.x something) you had to create your own "stop-app" script. I think the newer 2.3.x has it built in.
I am using GGTS 3.5.1, Grails 2.3.8, Java1.7 over Windows configuration the command is works for me "stop-app" and "run-app"

new grails project won't start

I'm trying to get my feet wet with grails, so I'm following a tutorial to get going with a sample project. I downloaded grails 2.3.2, added the environment variables for the command prompt commands, and successfully created a project by using >grails create-app teamwork. Calling >grails run-app after changing to the project directory successfully downloads all requisites, but then I get . I know that this exception doesn't reveal much, but do you guys have any ideas on why? I am running command prompt in admin mode, if that means anything.
Try not forking the JVM in BuildConfig.groovy, if I recall correctly. If that works, then check the JIRA issues for Grails 2.3.2.

Resources