rubyscript2exe problem

M

moinker

I'm trying to get rubyscript2exe working on a gtk+ gui ruby script but
I keep getting an error no matter how simple the script is that I use.
I believe I followed the directions to the letter on this page
http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_rubyscript2exe but it
still gives me this error:

C:\PROGEXE>rubyscript2exe2 guimain.rb
Tracing guimain ...
Gathering files...
Copying files...
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/tar2rubyscript.d.1028.1/rubyscript2exe/ev/
endencies.rb:16:in `dlls': undefined method `shift' for nil:NilClass
(NoMetho
ror)
from
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/tar2rubyscript.d.1028.1/rubys
pt2exe/init.rb:136
from C:/PROGEXE/rubyscript2exe2.rb:627:in `load'
from C:/PROGEXE/rubyscript2exe2.rb:627
from C:/PROGEXE/rubyscript2exe2.rb:622:in `newlocation'
from C:/PROGEXE/rubyscript2exe2.rb:578:in `newlocation'
from C:/PROGEXE/rubyscript2exe2.rb:506:in `newlocation'
from C:/PROGEXE/rubyscript2exe2.rb:506:in `newlocation'
from C:/PROGEXE/rubyscript2exe2.rb:578:in `newlocation'
from C:/PROGEXE/rubyscript2exe2.rb:622


Any help or ideas would be great. Thanks.
 
E

Erik Veenstra

undefined method `shift' for nil:NilClass (NoMetho ror)

What's the output of this:

c:\> ruby -e 'p ENV["WINDIR"]'

It should be something like "C:\WINDOWS". I hope it's not
empty...

gegroet,
Erik V. - http://www.erikveen.dds.nl/
 
M

moinker

Erik said:
undefined method `shift' for nil:NilClass (NoMetho ror)

What's the output of this:

c:\> ruby -e 'p ENV["WINDIR"]'

It should be something like "C:\WINDOWS". I hope it's not
empty...

gegroet,
Erik V. - http://www.erikveen.dds.nl/


I get nil when I run it like that.
I get nil on other computers too.

C:\DOCUME~1\ADMINI~1>ruby -e 'p ENV["WINDIR"]'
nil

but I got something strange going on. If I save the script to a file
and run it by double clicking the icon I get the right returns

I put these two commands into test.rb then double clicked test.rb and
this is the result


#test.rb
puts ENV["WINDIR"]
p ENV["WINDIR"]
#end test.rb

output: from double clicking
C:\WINNT
"C:\\WINNT"

when i type in test in the console i get

C:\DOCUME~1\ADMINI~1\DESKTOP>test
nil
nil
 
M

moinker

I got it to generate an exe by setting ARGV = ["guimain.rb"] in the
rubyscript2exe.rb file before the ARGV.concat [] command. Then I double
clicked on the rubyscript2exe.rb icon and it worked.

I also tried running it from the console and still get the undefined
method 'shift' error
 
E

Erik Veenstra

c:\> ruby -e 'p ENV["WINDIR"]'
I get nil when I run it like that.

It shouldn't be nil. Somehow, in your setup of the "console"
(command.com or cmd.exe?), this WINDIR isn't set. AFAIK, it
should always be set. Have you "unset" it on purpose?

(By the way, which Windows are you using?)

gegroet,
Erik V. - http://www.erikveen.dds.nl/
 
M

moinker

I always just hit start then run then typed in cmd to get to the
console. Never realized it was different than when you go through
start run programs accessories command prompt.
It works fine that way. Now I'm getting this error "pango-error **
file ../../../pango/pango/shape.c:line 75(pango_shape):assertion
failed:(glyphs->num_glyphs > 0) aborting.." Any ideas on that one?
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top