Gotchas for deploying jRuby on Rails 3.2 on Tomcat

2019-08-27 15:37发布

问题:

I'm experiencing some weird behaviours trying to deploying a jRuby on Rails (3.2) app on Tomcat7 using Warbler (warble executable war). And wanted to find out if they are normal or am I just doing some newbie mistake.

  1. The app deploys fine when the WAR file is exploded, but there are loading issues when trying to deploy from just the WAR file. What type of "typical" newbie mistakes generally causes this?

  2. Running java -jar app.war -S rake -T is incredibly slow on Windows (~1min30sec-2min30sec), but on Linux it is fine (~10-15sec). Is this a normal?

回答1:

I used to have loading issues before and after some research,
I've changed

securerandom.source=file:/dev/urandom with securerandom.source=file:/dev/./urandom

in $JAVA_PATH/jre/lib/security/java.security file and it load within a reasoanble time.

Hope this would help.