Search code examples
tomcatgrailsglassfishjrubyjrubyonrails

deploy jruby or grails on test server without compilation


I'm investigating the viability of using jvm languages for web development. I'm evaluating jruby on rails and grails. So far it looks like the only way to deploy these is to make a war file and deploy it to an application server like tomcat or glassfish. I just want to throw my source code up on a server like I do with regular ruby on rails. I understand the advantage to having it compiled and I'm not looking for arguments as to why that's better. This is on a testing environment for clients to be able to evaluate their application and to allow me to make quick changes that don't take recompiling the application explicitly. I like the ability to use scm to make changes locally and then pull the changes on the server. Do any of the application servers have this ability and if so how do I do it?


Solution

  • Typically Grails developers use the grails run-app script to run a local Tomcat instance pointing at their source code. It's not optimized for performance so it'd be a bad idea in general to run a public server this way, but if you're ok with the performance tradeoffs then you could do that. You can make things a bit faster using the 'prod' environment, e.g.

    grails prod run-app
    

    You could even configure your scm tool on the server to checkout the source code and run from there, or as you said manually update the files from your local machine.