Edge Monkeybars
December 4th 2008
Monkeybars lets you create elegant looking cross platform desktop apps with JRuby.
You’ll want to play with the latest and greatest versions of Monkeybars without conflicting with your current gem install. Here is a little guide on how to do just that.
Download
Fire up a terminal and enter the following:
mkdir -p ~/code/gems
git clone git://gitorious.org/monkeybars/mainline.git monkeybars-mainline
cd monkeybars-mainline
rake jar
mate ~/.bash_profile
This might take a while so grab a cup of coffee while you wait. At last count the Monkeybars repo was ~90MB.
Edit your bash profile
Once your bash profile pops up in Textmate add the following to the bottom of it:
function monkeybars-edge() {
ruby ~/code/gems/monkeybars-mainline/bin/monkeybars $1 $2
}
Great, almost there. You’ll just need to reload you bash profile, so either start a new terminal or run the following
. ~/.bash_profile
Note the leading dot.
Result?
Lets see if that worked:
martin$ monkeybars-edge myapp
Creating directory myapp
Copying monkeybars project structure
Excellent.
Anything else?
The version of Monkeybars added to the classpath in src/manifest.rb is likely to be an older one. If you peek in the lib/java directory you’ll see which version you have. Update the manifest line accordingly. In the example below it was 0.6.4 and I updated to 0.6.5.
require ‘resolver’
case Monkeybars::Resolver.run_location when Monkeybars::Resolver::IN_FILE_SYSTEM add_to_classpath ‘../lib/java/monkeybars-0.6.5.jar’ end
