I have been playing around with Grails for a while now. It is a great framework. One of the best alternatives for rapid application development under java stack.
Its idea of Convention over configuration is the seller. However, As I started developing apps on grails, it was hard to get use to the “convention” as sometimes the “convention” was not clear. When I searched the issue online, I could hardly find any relevant information. So I am starting to keep track of things I learned the hard way.
I wanted to install jQuery plug-in on my app so I followed instructions found at http://www.grails.org/plugin/jquery
I was having hard time installing it (will talk about that in bullet 2). So finally I installed jQuery Plug-in 1.4.2.
Later on I wanted to upgrade it to jQuery plug-in 1.4.4.
So this is what i did
a. uninstalled jquery plugin
b. ran grails install-plugin jquery 18.104.22.168
So issue so far, then I ran
c. grails install-jquery
but it kept adding jquery 1.4.2.
After hunting my file system down I figured out that apparently, Grails caches the script in \.grails\1.3.6\projects\\scriptCache
so when i installed the 1.4.2 it had kept scripts there but then when i wanted to upgrade, it still had the old script cached so it did not over write with 22.214.171.124 script.
So the solution was to delete all the scripts in scriptCache folder and run through steps a-c and walla.. it works!
Lesson learned: clear the scriptCache
2. Proxy Server Setup:
I was trying to install grails plug-ins at my work. I am behind a proxy. So when I tried to install a plug-in it basically gave me error saying “Host could not be reached”.
Then I simply went to the “Network Settings” in the SpringsourceTool Set and fixed the proxy. But still I kept on getting the same error.
After much of research I found out that we need to exclusively set up Proxy in Grails. And here is how we set it up:
a. grails add-proxy myProxy “–host=someproxyserver” “–port= 8080″
b. grails set-proxy myProxy
here you can call anything you want. and dont forget the part b ie set-proxy. Also, dont forget the ” around the host and port, for some reason in the OS i am using if i did not put ” it did not work correctly.
more info could be found at http://grails.org/doc/latest/ref/Command%20Line/set-proxy.html