Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2009 06:39
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jruby/258565 to your computer and use it in GitHub Desktop.
~/projects/jruby/tmp ➔ jruby -e "\$: << '../../maven_gem/lib'; require 'pom2gem.rb'; MavenGem::PomSpec.from_url('')"
~/projects/jruby/tmp ➔ ls -l *.gem
-rw-r--r-- 1 headius staff 1372160 Dec 17 00:18 org.clojure.clojure-1.0.0-java.gem
~/projects/jruby/tmp ➔ gem install org.clojure.clojure-1.0.0-java.gem
Successfully installed org.clojure.clojure-1.0.0-java
1 gem installed
Installing ri documentation for org.clojure.clojure-1.0.0-java...
Installing RDoc documentation for org.clojure.clojure-1.0.0-java...
~/projects/jruby/tmp ➔ jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'clojure'
=> true
irb(main):003:0> import Java::clojure.lang.RT
=> Java::ClojureLang::RT
irb(main):004:0> RT.load_resource_script 'foo.clj'
=> nil
irb(main):005:0> foo = RT.var('user', 'foo')
=> #'user/foo
irb(main):006:0> foo.invoke 'Hi', 'there'
=> "Hi there"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment