`rails app_name` => Exec format error (Errno:ENOEXEC)

Nelson Hsu wrote:

Ahh..found the answer. This is probably because I'm on a windows
machines, but you cannot execute `rails app` in a ruby script. You have
to write:

`rails.cmd app`

I use rails app all the time.. I'm not sure why you see a problem :-S

anything with a .cmd executes perfectly fine without the .cmd specified. So, rails.cmd is the same as typing as rails in Windows.

Cheers
..m.