Any tips on migrating code from Windows to UNIX

K

Kurt Euler

------_=_NextPart_001_01C51D59.27920F16
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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


------_=_NextPart_001_01C51D59.27920F16--
 
J

James Britt

Kurt said:
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
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top