[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Any tips on migrating code from Windows to UNIX

Kurt Euler

2/28/2005 5:49:00 AM

All- Can anyone give me some general tips and gotchas for how to migrate
Ruby code from Windows to UNIX (apart from taking care to convert drive
mappings)? A recent program I ran on Windows in a about 20 seconds runs
in about 1 second on a UNIX box. Only problem is, no work gets done.
Expected output files aren't created. No errors are thrown, but screen
"puts" for monitoring progress are sporatic.

Thanks in advance!

-Kurt

2 Answers

James Britt

2/28/2005 6:11:00 AM

0

Kurt Euler wrote:
> All- Can anyone give me some general tips and gotchas for how to migrate
> Ruby code from Windows to UNIX (apart from taking care to convert drive
> mappings)? A recent program I ran on Windows in a about 20 seconds runs
> in about 1 second on a UNIX box. Only problem is, no work gets done.
> Expected output files aren't created. No errors are thrown, but screen
> "puts" for monitoring progress are sporatic.

General tip: Watch out for alternate EOL characters.

Mostly an issue when the shebang line has a trailing ^M

The tip-off is usually a "bad interpreter" error message or something
along those lines.

More specific to your case: Try running with tracing:

% ruby -rtracer code.rb

Also verify file and directory permissions, though these things should
raise errors.

And turn on warnings.

James




Csaba Henk

2/28/2005 7:58:00 AM

0

On 2005-02-28, James Britt <jamesUNDERBARb@neurogami.com> wrote:
> % ruby -rtracer code.rb

Woohoo! I didn't know of this! That's cool!

Csaba