title: Rails app production broken after updating npm node JS from 10 to 14
body: <p>I have a rails 5.2 app on Apache passenger. I just updated nodeJS from 10 to 14 with NPM.</p>
  <p>Following this update I had to change the hardcoded path to nodeJS in Capistrano for the dev environment. It was the same path with a different version number.</p>
  <p>Now Passenger is crashing with the following error :</p>
  <pre><code>App 14672 output: Error: The application encountered the following error: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
  App 14672 output:     /srv/production/www/placedemarche/shared/bundle/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
  App 14672 output:     /srv/production/www/placedemarche/shared/bundle/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `&lt;module:ExecJS&gt;'
  App 14672 output:     /srv/production/www/placedemarche/shared/bundle/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `&lt;top (required)&gt;'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `require'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `each'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `block in require'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `each'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `require'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/bundler-2.2.30/lib/bundler.rb:175:in `require'
  App 14672 output:     /srv/production/www/placedemarche/releases/20211201115004/config/application.rb:11:in `&lt;top (required)&gt;'
  App 14672 output:     /srv/production/www/placedemarche/releases/20211201115004/config/environment.rb:2:in `require'
  App 14672 output:     /srv/production/www/placedemarche/releases/20211201115004/config/environment.rb:2:in `&lt;top (required)&gt;'
  App 14672 output:     config.ru:3:in `require'
  App 14672 output:     config.ru:3:in `block in &lt;main&gt;'
  App 14672 output:     /srv/production/www/placedemarche/shared/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
  App 14672 output:     /srv/production/www/placedemarche/shared/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
  App 14672 output:     config.ru:1:in `new'
  App 14672 output:     config.ru:1:in `&lt;main&gt;'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:101:in `eval'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:189:in `block in &lt;module:App&gt;'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:390:in `run_block_and_record_step_progress'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:188:in `&lt;module:App&gt;'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:30:in `&lt;module:PhusionPassenger&gt;'
  App 14672 output:     /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.10/src/helper-scripts/rack-preloader.rb:29:in `&lt;main&gt;'
  [ E 2021-12-01 12:55:13.2394 23785/Tm6 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /srv/production/www/placedemarche/current: The application encountered the following error: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    Error ID: edda577d
    Error details saved to: /tmp/passenger-error-3WHzvq.html
  
  [ E 2021-12-01 12:55:13.2475 23785/T8 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-714] Cannot checkout session because a spawning error occurred. The identifier of the error is edda577d. Please see earlier logs for details about the error.
  </code></pre>
  <p>node and nodejs are both working in the command line.</p>
  <p>EDIT : the value of $PATH : <code>/home/admin/.rvm/gems/ruby-2.5.5/bin:/home/admin/.rvm/gems/ruby-2.5.5@global/bin:/home/admin/.rvm/rubies/ruby-2.5.5/bin:/home/admin/.nvm/versions/node/v14.17.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/admin/.rvm/bin:/home/admin/.rvm/bin:/home/admin/.rvm/bin</code></p>