Exerb - how does it work?

Hi

I have been trying to make exerb work - I must be tired today because I
just don’t get it !

I went here and downloaded the windows version of exerb :
http://exerb.sourceforge.jp/index.en.html

The documentation is extremely poor with the faq seeming more interested
in explaining how to pronounce the name rather than
how to make it work.

From what i can see - I have to make a recepie file from my file.rb ??
then import that using the tool, which will make me a file.exe.

So how do I make a recepie file and what is one !! I followed the line :

$ ruby -r exerb/mkrbc foo.rb

which on my windows box was : ruby -r exerb/mkrbc c:/ip.rb

the reply : ruby:No such file to load – exerb/mkrbc (LoadError)

I ran the command just from my cmd in the c: directory - I even copied the
exerb folder that was created when i unzipped into c:/ruby/lib
no joy.

here’s the file I am trying to make an .exe out of :

···

class Test
def ipfind
a = ipconfig
a =~ /\d\d\d.\d\d.\d\d\d.\d\d/
ip = $~
return ip
end
end
i = Test.new.ipfind
puts i


Any clue how this works?

Thanks

Kingsley

ruby -r is just the same as ‘require’. In irb, try

require "exerb/mkrbc"

It should fail with the same LoadError. So you fix it by making the library
available in the library search path. The easiest way is to ‘cd’ to the
directory one level above exerb, since by default the library search path
includes “.” (the current directory)

Other options: move the exerb folder into the right place (check it contains
mkrbc.rb of course); or:

$:.unshift "/path/to/dir"
require "exerb/mkrbc"

Or I think you can set an environment variable (RUBYLIB or RUBY_LIB?) to
point at the right place.

Regards,

Brian.

···

On Sat, Jul 05, 2003 at 12:19:29AM +0900, Kingsley Hendrickse wrote:

which on my windows box was : ruby -r exerb/mkrbc c:/ip.rb

the reply : ruby:No such file to load – exerb/mkrbc (LoadError)

Not directly related, but you can find your IP address with …

require ‘socket’
i = IPSocket.getaddress(Socket.gethostname)
puts i

… although I just tried that in a win98 DOS box as

ruby -rsocket -e’puts IPSocket.getaddress(Socket.gethostname)’

and got no reply (& no error).

Should work ? (Probably my set-up; never use cmd line.)

daz

···

“Kingsley Hendrickse” KHendric@thoughtworks.com wrote:


class Test
def ipfind
a = ipconfig
a =~ /\d\d\d.\d\d.\d\d\d.\d\d/
ip = $~
return ip
end
end
i = Test.new.ipfind
puts i