Skip to content

Issue with Procfile.dev script in windows command line #29

@ashok-stack

Description

@ashok-stack

`$ ./bin/dev

C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC) from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in block in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in chdir' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:367:in block (2 levels) in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in upto'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in block in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in each'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in spawn_processes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/engine.rb:57:in start'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in run'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in dispatch'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/foreman-0.87.2/bin/foreman:7:in <top (required)>'
from C:/Ruby30-x64/bin/foreman:25:in load' from C:/Ruby30-x64/bin/foreman:25:in

'
`

webpack had a similar kind of issue rails/webpacker#613 they got around that by adding ruby infront while invoking the task i've tried the similar approach and it worked. added ruby path before executing the command in Procfile.dev

`web: C:/Ruby30-x64/bin/ruby.exe bin/rails server -p 3000

css: C:/Ruby30-x64/bin/ruby.exe bin/rails dartsass:watch`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions