Grails 2.5.4 auto reloading not working

1k views Asked by At

I am working with grails version 2.5.4. My application is running fine for me but I can't get any change or update if I change my controller code. I am using Intellij Idea 14. When I run my application my code is as below:

def index() {
    render "Hello world..."
}

Then after I change my code as below:

def index() {
        render "Hello world...Update"
}

I can't get update details on render with "Hello world...Update" text

2

There are 2 answers

5
Dipak Thoke On

you need put in your config.groovy file below configuration set reload gsp to true.

grails.gsp.enable.reload = true

For more details:

http://mrhaki.blogspot.in/2015/11/grails-goodness-enable-hot-reloading.html

0
Simon On

This is totally random, but I had the exact same problem, but mine suddenly appeared. It had been working for years, but then suddenly last week it stopped working.

The reason? Well, I had tidied up my disk and moved/renamed some files, and in doing so I had a folder which had a space in it's name. (ie all my projects were in a folder called \apps\grails\ and I then tidied things up so I had \apps\grails 2.1.1\ and \apps\grails 2.5.6\ etc.

As soon as I removed the spaces (so instead, I had \apps\grails2.5.6) - bingo! It started working again.