There seems to be a parsing bug in JRuby when the first line of a Ruby file is very long (~8000 characters or more). I created a gist with an example file here: https://gist.github.com/3497860 The first line creates a long array of hashes. Depending on how long the first line is or what the subsequent line is I'll see different errors such as SyntaxErrors or NameErrors. I saw on my system when the second line was very short the program would complete without any errors or output. This all seems to be related to a parse problem. If you remove one hash from the array then it parses correctly. I tried a few variants of the file on MRI and I couldn't reproduce the problem there.