[Previous entry: "Review of Test-Driven J2EE"] [Next entry: "Null as a method parameter"]
04/04/2005: "Cryptic documentation: RubyScript2Exe"
Don't get me wrong. I love the work that Erik Veenstra has done on EEE, Tar2RubyScript and RubyScript2Exe. Still, I would prefer he'd written one more line of documentation for his Tar2RubyScript package. Something less cryptic about how to use this package with Mac OS X.
As Google bait for others who might become stuck as I did, if you have problems with Tar2RubyScript on Mac OS X, with an error message like this:
Creating application_darwin ...
/sw/lib/ruby/1.8/ftools.rb:18:in `stat': No such file or directory -
/tmp/tar2rubyscript.d.999.1/rubyscript2exe/eee_darwin (Errno::ENOENT)
from /sw/lib/ruby/1.8/ftools.rb:18:in `syscopy'
from /sw/lib/ruby/1.8/ftools.rb:43:in `copy'
from /private/tmp/tar2rubyscript.d.999.1/rubyscript2exe/init.rb:217
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:556:in `load'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:556
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:551:in `newlocation'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:521:in `newlocation'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:457:in `newlocation'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:457:in `newlocation'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:521:in `newlocation'
from /Users/jbrains/Library/Ruby/rubyscript2exe.rb:565
You need to manually add the file eee_darwin (the one you compiled with FreePascal) into the rubyscript2exe package itself. That's what Erik means by "Copy eee_darwin to rubyscript2exe/" in his instructions. I did this:
stuart:~/Workspaces/general/DistributedRubyExperiments jbrains$ cd ~/Library/Ruby/ stuart:~/Library/Ruby jbrains$ ls eee_darwin rubyscript2exe.rb tar2rubyscript-0.4.5.rb stuart:~/Library/Ruby jbrains$ ruby rubyscript2exe.rb --tar2rubyscript-totar stuart:~/Library/Ruby jbrains$ ls eee_darwin rubyscript2exe.rb rubyscript2exe.tar tar2rubyscript-0.4.5.rb stuart:~/Library/Ruby jbrains$ tar xf rubyscript2exe.tar stuart:~/Library/Ruby jbrains$ ls eee_darwin rubyscript2exe.rb tar2rubyscript-0.4.5.rb rubyscript2exe rubyscript2exe.tar stuart:~/Library/Ruby jbrains$ cd rubyscript2exe stuart:~/Library/Ruby/rubyscript2exe jbrains$ ls LICENSE VERSION eee.pas eeew.exe require2lib.rb README eee.exe eee.rc ev SUMMARY eee.ico eee_linux init.rb stuart:~/Library/Ruby/rubyscript2exe jbrains$ cp ../eee_darwin . stuart:~/Library/Ruby/rubyscript2exe jbrains$ cd .. stuart:~/Library/Ruby jbrains$ mv rubyscript2exe.rb rubyscript2exe.rb.old stuart:~/Library/Ruby jbrains$ tar cf rubyscript2exe.tar rubyscript2exe stuart:~/Library/Ruby jbrains$ ruby tar2rubyscript-0.4.5.rb rubyscript2exe.tar Creating archive... Creating rubyscript2exe.rb ...And then I could use
rubyscript2exe, complete with Erik's experimental Mac OS X support. (Works so far!) I hope this helps save someone a little bit of time.
