The documentation says: lo_create([mode]): Return the PGlarge instance on success. On failure, it raises PGError exception.
At the moment, the function returns a FIXNUM, not an instance of PGlarge. Looking at the source in ext/pg.c, PGlarge is nowhere to be found. Even the example at sample/losample.rb doesn't work: (losample.rb:10: undefined method `oid' for 2677586:Fixnum (NoMethodError).
At the moment the only way to import/export large objects to/from the database is to use lo_import/lo_export. This generates much IO-load and slows an otherwise simple script that cuts large images into small pieces extremely down.
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]
Yours, Frederic Pollmann