It seems the metadata lines added by DrRacket (mentioned by John) are processed when the a source file is loaded into DrRacket (via the menu option File/Open), but are not processed if the source code is directly copied (e.g. from a browser window) into a DrRacket window and then executed with the 'Run' button.
The metadata includes a #reader directive, e.g.:
(#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname snake-full) ...)
This reader directive appears to be silently ignored by DrRacket when the source is 'Run', even though DrRacket shows "#reader" in red (as when an error is detected). The actions taken by DrRacket when 'Run' is pressed seem to depend on the settings in effect when the code is executed, which could be nothing, or throwing a confusing error.
The solution for the original poster's issue is as John directs; remove the metadata (i.e. #reader directive) and manually set the language.
However, I feel that DrRacket should recognize and act on (and perhaps also remove/hide from view) the metadata if the metadata occurs as from a copy/paste directly into a DrRacket window (e.g. as from a URL). The current behaviour is, I think, a bug and a trap (perhaps showstopping) for a new user experimenting with Racket.
Note that the Racket executable seems to process the metadata properly, understanding the language to use, etc.. so that the code behaves as intended.