Freaky freaky Sandbox has come to JRuby


I would like to announce the first release of JavaSand, which brings _why’s spooky Sandbox to JRuby.

For those of you who hasn’t played with Sandbox, it allows you to create a new area for executing Ruby where you have control on which classes are loaded and available. It’s good for lots of things. It can be made very secure, for example. Or you can load several applications in different Sandboxes and they won’t interfere with each other in any way.

Now, in MRI, this is done through some fairly involved swapping of symbol tables. In JRuby things are quite a lot easier. Actually, it’s only a matter of loading the right classes and remove all methods not allowed.

So, how do you get to use sandbox from JRuby? First of all, you need a special JRuby, that can be checked out and compiled from svn://svn.codehaus.org/jruby/branches/sandbox. This functionality will come to regular JRuby to, but not until after 0.9.2 has been released. So, when you have this special version downloaded, you just install the RubyGem called javasand, and you’re set to go. If you would like a fun example to try out, you can download sandbox_server directly from _why’s code repository http://code.whytheluckystiff.net/svn/sandbox/trunk/bin/sandbox_server. To run it:

jruby -rubygems sandbox_server

and you can connect to your machine at port 5000, press enter, and you have an IRB session. Wow!

So, the project JavaSand is part of JRuby-extras and the source is in that repository, at RubyForge! Go ahead and test it now!



Announcing ActiveRecord-JDBC 0.2.2


Version 0.2.2 of ActiveRecordJDBC have now been released. It contains numerous smaller bug fixes, but more importantly the support for MimerSQL. The internals have been slightly refactored to allow easier change of database specific instructions further down the road.

The release can be found at http://rubyforge.org/frs/?group_id=2014 or installed through RubyGems.