Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Can't use runtime because `File.executable?` returns false

Aperta
#106 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
docker, ruby
Ambito
tooling

Direzione di ricerca

Start in lib/execjs/external_runtime.rb at ExternalRuntime.locate_executable and reproduce the reported File.executable? result using the Docker, Ruby 2.7.4, and ExecJS 2.8.1 setup described. Compare the behavior for the present /usr/bin/node executable and identify the expected runtime-detection behavior; the issue does not name a test or a specific intended change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hey guys,

Something weird here. I'm getting the error below when trying to start the Docker container:

ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime.

After some debugging, I found a strange behavior on ExecJS::ExternalRuntime.locate_executable , where the File.executable?(full_path) is returning false, although the /usr/bin/node executable is present.

pry> File.stat('/usr/bin/node').owned?
=> true

pry(#<ExecJS::ExternalRuntime>)> File.executable?('/usr/bin/node')
=> false

pry(#<ExecJS::ExternalRuntime>)> File.file?('/usr/bin/node')
=> true

https://github.com/rails/execjs/blob/3e940787938f134ddb7c2df4ed36a56dd0891db5/lib/execjs/external_runtime.rb#L137

== Stack ==
Docker
Ruby 2.7.4
ExecJS 2.8.1

Lingua principale
Ruby
Stelle
578
Fork
286
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rails/execjs

Tutte le issue di rails/execjs

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.