0
@@ -50,16 +50,11 @@ JRuby runtime management and pooling is done automatically by the framework. In
0
the case of Rails, runtimes are pooled. For Merb and other Rack applications, a
0
single runtime is created and shared for every request.
0
-At this time, you need a trunk version of JRuby to complete this build so make
0
-sure you are in a shell with your $PATH environmental variable setup to include
0
-the path to $JRUBY_HOME/bin.
0
+Ensure you have JRuby with the buildr and rack gems installed.
0
-Install the prerequisite Gems, buildr (A Ruby replacement for Maven) and rack.
0
- jruby -S gem install buildr --source http://caldersphere.net
0
- jruby -S gem install rack
0
+ jruby -S gem install buildr rack
0
Checkout the JRuby Rack code and cd to that directory
0
@@ -70,12 +65,13 @@ Resolve dependencies, compile the code, and build the jar file.
0
jruby -S buildr package
0
-The generated jar should be located here: target/jruby-rack-
1.0-SNAPSHOT.jar.
0
+The generated jar should be located here: target/jruby-rack-
*.jar.
0
This example shows how to create and deploy a simple Rails app using the
0
-embedded Java database H2 to a WAR using Warble and JRuby Rack.
0
+embedded Java database H2 to a WAR using Warble and JRuby Rack. JRuby Rack is now
0
+included in the latest release of Warbler (0.9.9), but you can build your own jar from source and substitute it if you like.
0
Install Rails and the driver and ActiveRecord adapters for the H2 database:
0
@@ -138,21 +134,6 @@ the WAR.
0
Continue editing config/warble.rb and add the following line after these
0
- # Additional Java .jar files to include. Note that if .jar files are placed
0
- # in lib (and not otherwise excluded) then they need not be mentioned here
0
- # JRuby and Goldspike are pre-loaded in this list. Be sure to include your
0
- # own versions if you directly set the value
0
- # config.java_libs += FileList["lib/java/*.jar"]
0
-This will tell Warble to not include the jars jruby-complete-1.1RC2,
0
-goldspike-1.5, commons-pool-1.3.jar, and activation-1.1.jar. You will be
0
-replacing these with the trunk version of jruby-complete.jar and
0
-jruby-rack-1.0-SNAPSHOT.jar.
0
-Continue editing config/warble.rb and add the following line after these
0
# Gems to be packaged in the webapp. Note that Rails gems are added to this
0
# list if vendor/rails is not present, so be sure to include rails if you
0
@@ -164,18 +145,6 @@ comments:
0
This will tell Warble to add the JDBC driver for H2 as well as the ActiveRecord
0
JDBC and JDBC-H2 adapter Gems.
0
-Copy the trunk version of jruby-complete.jar (created with "ant
0
-jar-complete") into the {{blog/lib}} directory (replace $JRUBY_HOME with the
0
-actual path in the statement below unless $JRUBY_HOME is already defined):
0
- cp $JRUBY_HOME/lib/jruby-complete.jar lib/
0
-Copy the snapshot version of jruby-rack-1.0-SNAPSHOT jar into the blog/lib
0
-directory (replace $JRUBY_RACK_HOME with the actual path in the statement below
0
-unless $JRUBY_RACK_HOME is already defined):
0
- cp $JRUBY_RACK_HOME/target/jruby-rack-1.0-SNAPSHOT.jar lib/
0
Now generate the WAR file:
Comments
No one has commented yet.