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

Hi,

I’m trying to run the ‘rails’ command from a ruby script. I’m able to
do something like svn this_and_that just fine, but I can’t seem to
execute the rails command using:

rails new_app

It keeps throwing an error:
Exec format error - rails new_app (Errno:ENOEXEC).

Am I missing something?

Thanks,
Nelson

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

Nelson H. wrote:

Hi,

I’m trying to run the ‘rails’ command from a ruby script. I’m able to
do something like svn this_and_that just fine, but I can’t seem to
execute the rails command using:

rails new_app

It keeps throwing an error:
Exec format error - rails new_app (Errno:ENOEXEC).

Am I missing something?

Thanks,
Nelson

Nelson H. 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs