JRuby+Jetty+JAR Hello World
This is an example “Hello World” web application as a demonstration for bundling a JRuby application with JAR dependencies up into a single unified JAR you can run with the only deployment requirement being a working Java on your target system.
This way if you have a system that’s already running a particular JRuby release, you can “vendor all the things” and deploy an application like this without worrying about breaking anything on your server since you don’t have to muck with any existing Ruby environment, Gems, Bundler, et all.
- Downloaded the package for OSX
- Mount it
- Drag the
1.7.0u6.jdkyou should find to
- Select the new version as the default in
Java Preferences(look for it with Spotlight)
From the root of the project run:
mvn clean install
Then you can just start it up!
java -jar target/jetty-hello-world-1.0.0-SNAPSHOT.jar
To benchmark I run this:
httperf --num-conns=50 --num-calls=2000 --port 9292
After warm-up the second time I get over 7,000 requests per second.