Productive setup for Rails development on JRuby

Hi,

I’m trying to minimize any interruption to my flow when developing a
Rails app. My current setup is thus:

  1. Edit ruby code.
  2. Maven build / deploy to local Tomcat instance. This uses warbler to
    build a war, and maven to pull in other Java lib dependencies and
    deploy to tomcat.
  3. Browse my app to see the changes that I’ve made.

The build / deploy step takes a minute, but it interrupts and slows
down the feedback loop between writing code and seeing what it does.

Now, the reason that I’m deploying to Tomcat is that I have a JNDI
resource which is used by the application (not JDBC or anything that
simple).

My currently envisaged ideal flow would be:

  1. Edit ruby code
  2. Browse the app to see the changes I’ve made.

Any suggestions as to how I get there? I can’t see that the Glassfish
gem will let me define a JNDI resource that I need. Potentially, I
could try using symlinks to update an exploded WAR in Tomcat, but that
doesn’t work for the Windows guys on my team.

If java dependencies change, then I’m willing to suffer a build /
deploy cycle to pick that up, but otherwise I could be looking at
wasting an hour a day for builds and associated difficulties in
maintaining a good development state.

Cheers,

James


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Jun 22, 2009 at 6:16 AM, James A. [email protected]
wrote:

  1. Browse the app to see the changes I’ve made.

Agree. We have a little work to do to get Tomcat or Jetty running
comfortably with mixed-Ruby and Java apps. You might take a look at
tomcat-rails to see if you can bend it to your will.

http://github.com/calavera/tomcat-rails/tree/master

I hope to have time this summer to look at improving both tomcat-rails
and
jetty-rails to make them suitable for mixed mode development.

/Nick

i use warbler and deploy once to tomcat, and then i use a rake task to
sync changes made to /app and /public from my project folder…so:

  1. edit ruby code
  2. run rake task to sync to tomcat
  3. browse my app to see the changes i’ve made

#2 is just pushing a button, so i’ve found i can live with that

Richard F.