exerb - how does it work?

  • Thread starter Kingsley Hendrickse
  • Start date
K

Kingsley Hendrickse

This is a multipart message in MIME format.
--=_alternative 00542BEA80256D59_=
Content-Type: text/plain; charset="us-ascii"

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







--=_alternative 00542BEA80256D59_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">Hi</font>
<br>
<br><font size=2 face="sans-serif">I have been trying to make exerb work - I must be tired today because I just don't get it !</font>
<br>
<br><font size=2 face="sans-serif">I went here and downloaded the windows version of exerb : &nbsp;http://exerb.sourceforge.jp/index.en.html</font>
<br>
<br><font size=2 face="sans-serif">The documentation is extremely poor with the faq seeming more interested in explaining how to pronounce the name rather than</font>
<br><font size=2 face="sans-serif">how to make it work.</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">So how do I make a recepie file and what is one !! I followed the line :</font>
<br>
<br><font size=3 color=#333333 face="Courier New">$ ruby -r exerb/mkrbc foo.rb</font>
<br>
<br><font size=2 face="sans-serif">which on my windows box was : &nbsp; &nbsp; &nbsp;ruby -r exerb/mkrbc c:/ip.rb</font>
<br>
<br><font size=2 face="sans-serif">the reply : ruby:No such file to load -- exerb/mkrbc (LoadError)</font>
<br>
<br><font size=2 face="sans-serif">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</font>
<br><font size=2 face="sans-serif">no joy.</font>
<br>
<br><font size=2 face="sans-serif">here's the file I am trying to make an .exe out of :</font>
<br>
<br><font size=2 face="sans-serif">________________</font>
<br><font size=2 face="sans-serif">class Test</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; def ipfind</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; a = `ipconfig`</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; a =~ /\d\d\d\.\d\d\.\d\d\d\.\d\d/</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; ip = $~</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; return ip</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; end</font>
<br><font size=2 face="sans-serif">end</font>
<br><font size=2 face="sans-serif">i = Test.new.ipfind</font>
<br><font size=2 face="sans-serif">puts i</font>
<br><font size=2 face="sans-serif">_______________</font>
<br>
<br><font size=2 face="sans-serif">Any clue how this works?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br>
<br><font size=2 face="sans-serif">Kingsley</font>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--=_alternative 00542BEA80256D59_=--
 
B

Brian Candler

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

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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top