JRuby realpath and realpath for 1.8

Hi -

I am trying to get rbx-require-relative | RubyGems.org | your community gem host
working on JRuby.

When I run:
$ jruby --1.9 -e ‘require_relative “./version.rb”’

I get:

builtin/prelude.rb:38:in require_relative': undefined method realpath’
for File:Class (NoMethodError)
from -e:1

What’s wrong?

From the above, I infer that realpath should return a fully
qualified path rather than possibly a relative path as FILE can do?

If so, how can one write realpath in the 1.8 flavor of JRuby?

For the record, tried this on:

jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (OpenJDK
Server VM 1.6.0_20) [i386-java]