Ruby Gems got me confused
Posted by tom February 23rd, 2007
Recently (well okay maybe not so recently?) there were quite a bit of changes to RubyGems, one of which is that require_gem is deprecated. Previously I could say:
require 'rubygems'
require_gem 'mygem'
This would automagically require ‘mygem’ because of spec.autorequire. There’s also:
require 'rubygems'
gem 'mygem', '>=0.0.8'
This doesn’t do a require ‘mygem’ but I’m able to indicate a version which should be used. Then, which by now should be the standard (if I read everything correct):
require 'rubygems'
require 'mygem'
But where’s the version in that? Maybe this would be an even better solution:
require 'rubygems'
require 'mygem', '>=0.0.8'
But this doesn’t work: ArgumentError: wrong number of arguments (2 for 1). The question is: What is the solution? What should I use and what shouldn’t I use?
U2 Ruby: Ruby integration for IBM UniVerse and UniData
Posted by tom February 8th, 2007
This week a colleague and myself have been working hard to create a Ruby extension which allows Ruby to make RPC calls to UniVerse and UniData (the IBM U2 databases). The module has been dubbed U2, the class UniRPC. It implements the intercall interface, and from that the functions: open, close, opensession, quit, readlist, execute, read, write & delete. Within the c-code it translates the @FM separated records (and readlists) into Ruby Arrays (for easy access). It currently does not translate @VM, @SM & @TM to sub-array structures, but maybe one day…
We’ve also created a ActiveRecord-like class to work with U2 files (tables & records) all in all pretty interesting!!
