rails on jruby
DESCRIPTION
A presentation I delivered to the Melbourne Ruby User's Group on some of the things Rails developers need to be aware of when getting a Rails application running on top of JRuby.TRANSCRIPT
JRuby & RailsJumping tracks with minimal pain
Contents
• JRuby & Rails
• Why?
• Things to Watch
• Databases
• Servers & Deployment
• Beyond Rails with JRuby
Why Rails on JRuby?
Why?
• Easier deployments
• Potential scalability
Warning Signs?
Danger!
• Relying upon Native Code
• Gems
• Standard Library
Databases
• Pure Ruby Drivers
• Slow(er)
• Most Compatible
ActiveRecord-JDBC
• JDBC: Java’s Native Database Protocol
• More Databases Supported
• Faster
• Odd compatibility issues?
Database Config Demo
Deployment
• Deploying to Mongrels/etc. = JRuby 1.0
• Deploying to Java = Preferred JRuby 1.1+
Serving from Java
• Packaging your application
• Getting it to the server
Packaging with Warbler
• Packaging your Rails app for Java Servers
• Resultant artefact is a deployable Application
Warbler Config Demo
Java on Development
• script/server still works
• jetty_rails
• glassfish_rails
Moving to Production
• Java 5 (or higher) is the key!
Beyond Rails?
• Calling Rails from a Java webapp?
• Use Merb? Camping?
Beyond Rails?
• Rack support!
Links
• JRuby
• http://www.jruby.org
• http://wiki.jruby.org
• JRuby Inside: http://www.jrubyinside.com
• Nick Sieger: http://blog.nicksieger.com/