env: ruby\r: No such file or directory

I had a weird problem tonight with a Rails app I was looking at for work. Both the script/runner and the script/server scripts wouldn’t run. They would return this:

env: ruby\r: No such file or directory

So I dug into script/server and basically commented out and replaced all the lines. Now all the sudden it works and runner still doesn’t. Strange. Checked my env and all is right and also my PATH. Can’t seem to figure it out.

Maybe someone knows.

Category: Code

2 Responses to “env: ruby\r: No such file or directory”

  1. David Turnbull

    Windows, or maybe oldschool Mac-style CRLF in your scripts. There should only be an \n at the end.

  2. Clint Hill

    Indeed. That’s it. Thanks!


Leave a Reply



Back to top