Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Update README with rake instructions

  • Loading branch information...
commit d133b9f14e8409e8fccdfd394e28b26ad7978a45 1 parent 359810a
@chrishunt chrishunt authored
Showing with 13 additions and 22 deletions.
  1. +13 −22
@@ -1,4 +1,4 @@
-# Running Ruby from Clojure
+# Ruby from Clojure
This is a simple example of calling Ruby from Clojure. It contains a simple
JRuby project and a Clojure project:
@@ -8,29 +8,20 @@ JRuby project and a Clojure project:
* `speaker_selector` - Returns a "top" speaker for the given day using a
sophisticated algorithm (ie, random selection)
-## Compiling
- cd steel_city
- jrubyc --javac schedule.rb
- jar -cf schedule.jar com/steelcity/Schedule.class
-## Installing with mvn
-In your clojure project, set up the dependencies in the project.clj.
-You will need dependencies on jruby and your compiled jar.
-You will have to install these with mvn so that lein deps loads the
+## Running
- mvn install:install-file -DgroupId=com.steelcity.schedule \
- -DartifactId=com.steelcity.schedule -Dversion=0.0.0 \
- -Dpackaging=jar -Dfile=schedule.jar
+ $ rake
-The command to install jruby to your local mvn repository will be similar.
+ => (import com.steelcity.Schedule)
+ => (top-speaker "Friday")
+ => (top-speaker "Saturday")
-## Running
+## How does this work?
-In the Clojure REPL, load the speaker-selector.core namespace and run:
+For detailed instructions on how to get this working with your own Ruby code,
+have a look at the `Rakefile`
- (top-speaker "Friday")
- (top-speaker "Saturday")
+ rake clean # Remove build artifacts
+ rake compile # Compile Ruby into Java bytecode
+ rake install # Install and copy to Clojure project
+ rake run # Start leiningen repl
Please sign in to comment.
Something went wrong with that request. Please try again.