Check your line endings!

Tuesday 01/22/2008  –  Category: Uncategorized

I had a problem with a file today that had a bunch of ^M breaks that was causing the class to not load correctly. if you ever run into a problem with a particular file, check your line endings!

“The different newline conventions often cause text files that have been
transferred between systems of different types to be displayed
incorrectly. For example, files originating on Unix or Apple Macintosh systems may appear as a single long line on a Windows system. Conversely, when viewing a file from a Windows computer on a Unix system, the extra CR may be displayed as ^M at the end of each line or as a second line break.”

[via wikipedia]

Thanks notch8 for narrowing down the problem to a single file. I was going crazy trying to figure out if it was a problem with rails requires and dependencies…

Leave a Reply