This is a driver (or bridge) to allow your Ruby code to use the Java Hypersonic database.

There are two things you need to do before you can use this driver.

First, you must have the Yet Another Java Bridge project installed.

Second, you must have hsqldb.jar in your classpath. I put a copy in the lib folder but you'll still need to set your own classpath.

If you can run "rake test", then you're environment is probably fine. Just be sure that the user account you'll be running the driver under also has their classpath set up properly.

You can download the gem or the source. To build and install from the source, type "rake gem", then "gem install hypersonic-1.0.gem" or "sudo gem install hypersonic-1.0.gem".  

The source can be downloaded with Subversion.

svn checkout svn://rubyforge.org/var/svn/hypersonic

You can see how to use the driver from the example from the test folder. The Test_hypersonic.rb file will show you exactly how to use the driver, but here's a short example as well. It's extracted from the test folder.

@temp_table_name = "TEMP_TABLE_FOR_THESE_TESTS"
@h = Hypersonic.new
@h.connect("jdbc:hsqldb:file:testdb2", "sa", "")
@h.execute_update("DROP TABLE #{@temp_table_name} IF EXISTS")
@h.execute_update("CREATE TABLE #{@temp_table_name} (c1 INTEGER, c2 VARCHAR)")
@h.execute_update("INSERT INTO #{@temp_table_name}(c1, c2) VALUES (32, 'howdy')")
rs = @h.execute_query("SELECT * FROM #{@temp_table_name}")
rs = @h.execute_query("SELECT COUNT(*) FROM #{@temp_table_name}")

Please let me know if you have problems running the driver.

Jared
http://JaredRichardson.net