Execjs runtime error

Running: bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV
Skip to content



Open


Issue created Nov 25, 2020 by dxdc@dxdc

ExecJS::RuntimeError in 13-5-stable

Running:

bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096" --trace

On 13-5-stable produces the below error. Tried node 10 and 12. Everything worked fine previously on 13-3-stable.

Error snippet:

** Execute assets:precompile
rake aborted!
ExecJS::RuntimeError: /tmp/execjs20201125-10012-6uf9vrjs:443
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("source-map")):"function"==typeof define&&define.amd?define(["exports","source-map"],t):t((e=e||self).Terser={},e.sourceMap)}(this,(function(e,t){"use strict";function n(e){return e.split("")}function i(e,t){return t.includes(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;class r extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function o(e,t,n){!0===e&&(e={});const i=e||{};if(n)for(const e in i)if(D(i,e)&&!D(t,e))throw new r("`"+e+"` is not a supported option",t);for(const n in t)if(D(t,n))if(e&&D(e,n))if("ecma"===n){let t=0|e[n];t>5&&t<2015&&(t+=2009),i[n]=t}else i[n]=e&&D(e,n)?e[n]:t[n];else i[n]=t[n];return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;retu

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3
(execjs):443

Full log:

«`
** Invoke yarn:install (first_time)
** Invoke yarn:available (first_time)
** Execute yarn:available
** Execute yarn:install
yarn install v1.22.5
[1/4] Resolving packages…
success Already up-to-date.
$ node ./scripts/frontend/postinstall.js
success Dependency postinstall check passed.
Done in 1.44s.
yarn install v1.22.5
[1/5] Validating package.json…
[2/5] Resolving packages…
success Already up-to-date.
$ node ./scripts/frontend/postinstall.js
success Dependency postinstall check passed.
Done in 1.46s.
** Invoke gitlab:assets:clean (first_time)
** Invoke assets:clean (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:clean
** Execute gitlab:assets:clean
** Invoke gitlab:assets:compile (first_time)
** Execute gitlab:assets:compile
** Invoke yarn:check (first_time)
** Invoke yarn:available
** Execute yarn:check
warning Resolution field «monaco-editor@0.20.0» is incompatible with requested version «monaco-yaml#monaco-editor@^0.19.2»
warning Resolution field «chokidar@3.4.0» is incompatible with requested version «watchpack#watchpack-chokidar2#chokidar@^2.1.8»
`yarn:check` finished in 4.985121626 seconds
** Invoke gettext:po_to_json (first_time)
** Invoke environment
** Execute gettext:po_to_json
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/et_EE
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ca_ES
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/gl_ES
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/pt_BR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/pt_BR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/id_ID
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sl_SI
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/tr_TR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ar_SA
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sq_AL
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/bn_BD
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/he_IL
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ka_GE
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sr_SP
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fa_IR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ig_NG
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/si_LK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/mn_MN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fr
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fr
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/hu_HU
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sk_SK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/es
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/es
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_CN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_CN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/uz_UZ
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/bs_BA
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sw_KE
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/vi_VN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/eo
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/eo
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_HK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_HK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/bn_IN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ba_RU
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/el_GR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/am_ET
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/as_IN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/pt_PT
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fil_PH
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ro_RO
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/bg
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/bg
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ja
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ja
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/en
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/en
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ur_PK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ko
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/lt_LT
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/pa_IN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/is_IS
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/hi_IN
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_TW
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_TW
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ky_KG
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/de
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/de
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/kab
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/pl_PL
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/cs_CZ
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ru
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ru
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/da_DK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/nb_NO
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sv_SE
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/hr_HR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/sr_CS
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/it
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/it
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/nl_NL
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ku_TR
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fi_FI
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/az_AZ
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/uk
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/uk
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/cy_GB

All files created, make sure they are being added to your assets.
If they are not, you can add them with this line (configurable):

//= require_tree ./locale
//= require gettext/all

gettext:po_to_json finished in 39.073102426 seconds
** Invoke assets:precompile (first_time)
** Invoke assets:environment
** Invoke yarn:install
** Execute assets:precompile
rake aborted!
ExecJS::RuntimeError: /tmp/execjs20201125-10012-6uf9vrjs:443
!function(e,t){«object»==typeof exports&&»undefined»!=typeof module?t(exports,require(«source-map»)):»function»==typeof define&&define.amd?define([«exports»,»source-map»],t):t((e=e||self).Terser={},e.sourceMap)}(this,(function(e,t){«use strict»;function n(e){return e.split(«»)}function i(e,t){return t.includes(e)}t=t&&Object.prototype.hasOwnProperty.call(t,»default»)?t.default:t;class r extends Error{constructor(e,t){super(),this.name=»DefaultsError»,this.message=e,this.defs=t}}function o(e,t,n){!0===e&&(e={});const i=e||{};if(n)for(const e in i)if(D(i,e)&&!D(t,e))throw new r(«"+e+" is not a supported option»,t);for(const n in t)if(D(t,n))if(e&&D(e,n))if(«ecma»===n){let t=0|e[n];t>5&&t<2015&&(t+=2009),i[n]=t}else i[n]=e&&D(e,n)?e[n]:t[n];else i[n]=t[n];return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;retu

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3
(execjs):443
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:219:in exec_runtime' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in exec’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:14:in initialize' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in new’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in compile' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/execjs-2.7.0/lib/execjs/module.rb:27:in compile’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/terser-1.0.2/lib/terser.rb:183:in context' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/terser-1.0.2/lib/terser.rb:223:in run_terserjs’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/terser-1.0.2/lib/terser.rb:164:in compile' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/terser-1.0.2/lib/terser/compressor.rb:45:in call’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/terser-1.0.2/lib/terser/compressor.rb:23:in call' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:99:in load’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:129:in depend_on_asset' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:160:in link_asset’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/context.rb:27:in compute_asset_path' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionview-6.0.3.3/lib/action_view/helpers/asset_url_helper.rb:201:in asset_path’
/home/git/gitlab/app/assets/javascripts/lib/ace/ace_config_paths.js.erb:22:in block in _evaluate_template' /home/git/gitlab/app/assets/javascripts/lib/ace/ace_config_paths.js.erb:21:in each’
/home/git/gitlab/app/assets/javascripts/lib/ace/ace_config_paths.js.erb:21:in _evaluate_template' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/erb_processor.rb:26:in call’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/erb_processor.rb:13:in call' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in block in call’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in dfs' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in call’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in find_asset' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in find_all_linked_assets’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in block in find' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in each’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in find' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in compile’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:67:in block (3 levels) in define' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in with_logger’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:66:in block (2 levels) in define' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in block in execute’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in each' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in execute’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:214:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in mon_synchronize’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:194:in invoke_with_call_chain' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:183:in invoke’
/home/git/gitlab/lib/gitlab/task_helpers.rb:18:in invoke_and_time_task' /home/git/gitlab/lib/tasks/gitlab/assets.rake:59:in each’
/home/git/gitlab/lib/tasks/gitlab/assets.rake:59:in block (3 levels) in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in block in execute’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in each' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in execute’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:214:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in mon_synchronize’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:194:in invoke_with_call_chain' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:183:in invoke’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:160:in invoke_task' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in block (2 levels) in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in each' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in block in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:125:in run_with_threads' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:110:in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:83:in block in run' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in standard_exception_handling’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in run' /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in <top (required)>’
/home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/rake:23:in load' /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/rake:23:in <top (required)>’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in load' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in kernel_load’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:28:in run' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:463:in exec’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in run' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in dispatch' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:27:in dispatch’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in start' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:18:in start’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:30:in block in <top (required)>' /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/friendly_errors.rb:124:in with_friendly_errors’
/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:22:in <top (required)>' /usr/local/rvm/rubies/ruby-2.6.6/bin/bundle:23:in load’
/usr/local/rvm/rubies/ruby-2.6.6/bin/bundle:23:in `’
Tasks: TOP => assets:precompile

Edited Nov 26, 2020 by dxdc

My schedule right now is not very tight and I have a couple of hours free almost everyday. So instead of playing Skyrim, I am learning Ruby on Rails.

I am using RVM (http://beginrescueend.com/) on Ubuntu Ubuntu 10.04 LTS (Lucid Lynx).

Here is the error I get when I try to run “rails server”:

wenbert@ubuntu:~/projects/rails/depot$ rails server
/home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.12/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.12/lib/execjs.rb:5:in `<module:ExecJS>'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.12/lib/execjs.rb:4:in `<top (required)>'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
	from /home/wenbert/.rvm/gems/ruby-1.9.2-p290/gems/coffee-rails-3.1.1/lib/coffee-rails.rb:1:in `require'
	from /home/wenber

A lot of people have already experienced this error. There is a popular thread for this in Stackoverflow – here. The Original Poster of the thread selected the this answer:

I’m on Ubuntu 11.04. Had similar issues. Installing node.js fixed this for me

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

But I think the more appropriate answer is the one by vincent jacquel in this thread.

The Fix

  1. Open the Gemfile
  2. Add these lines:
    gem 'execjs'
    gem 'therubyracer'
  3. Save.
  4. Then run this command: $> bundle after

This entry was posted in Uncategorized. Bookmark the permalink.

trying to run the rails server i get this error:

/var/lib/gems/2.1.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /var/lib/gems/2.1.0/gems/execjs-2.6.0/lib/execjs.rb:5:in `<module:ExecJS>'
    from /var/lib/gems/2.1.0/gems/execjs-2.6.0/lib/execjs.rb:4:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `require'
    from /var/lib/gems/2.1.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `<top (required)>'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in `require'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `each'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block in require'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `each'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `require'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:133:in `require'
    from /home/acne/Documents/WWW/web/config/application.rb:7:in `<top (required)>'
    from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:79:in `require'
    from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:79:in `block in server'
    from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:76:in `tap'
    from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:76:in `server'
    from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /usr/lib/ruby/vendor_ruby/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

How can i solve this?
Thanks for your time !

Thomas Ward's user avatar

Thomas Ward

70.4k29 gold badges172 silver badges236 bronze badges

asked Oct 14, 2015 at 22:04

Michel Ortega's user avatar

1

Either Install Node Js or install therubyracer gem

gem install therubyracer

Community's user avatar

answered Oct 15, 2015 at 10:55

Tachyons's user avatar

TachyonsTachyons

17.1k18 gold badges74 silver badges116 bronze badges

  1. Comment the gem «therubyracer».
  2. install nodejs.
  3. run the server again.

bummi's user avatar

bummi

3943 gold badges9 silver badges14 bronze badges

answered Feb 16, 2016 at 14:38

cloxure's user avatar

Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Posted by Matthew McLennan

I’m on a Windows 8 PC. I get this error in the middle of the Ruby «Generate Rails Application» when I type statuses after localhost:3000.

Has anyone else experienced this?

7 Answers

Matthew McLennan March 20, 2013 5:09pm

Got it! Open up treebookassetsjavascriptsapplication.js

Delete //=require_tree at the bottom of the document.

Michael Lerner May 11, 2013 5:53pm

Timothy Chan

Timothy Chan

Jay Killeen

PLUS

I just went through this same problem.

I used the solution found on this page of StackExchange

http://stackoverflow.com/questions/13530042/execjsruntimeerror-in-usersindex-ror

The only difference to my solution was I had to modify the runtimes.rb file found under the execjs-2.0.2 directory. In the comments of StackExchange someone tries to correct it and say it should be runtime.rb. That lead me down a path that didn’t solve the problem. But the original answer leads you to

«C:RailsInstallerRuby1.9.3librubygems1.9.1gemsexecjs-1.4.0libexecjsru??ntimes.rb»

when it should be

«C:RailsInstallerRuby1.9.3librubygems1.9.1gemsexecjs-2.0.2libexecjsru??ntimes.rb»

Oliver Gibbs

Thanks for that, the //=require_tree solution above worked for me.
For those that are ahead/finished in the Rails course from this question, how are you finding it using Windows? I’m on Windows 8 and as the lessons are done on a Mac I wondered if these problems are going to keep happening. This four minute video has taken me 20 minutes to get through and I’m wondering if I should just start borrowing my wifes Macbook for this. Thoughts?

Olatunde Alegbe

Понравилась статья? Поделить с друзьями:
  • Exec format error for command
  • Exception 0x1333 generation failed как исправить assassins creed valhalla
  • Exec format error docker compose
  • Except socket error msg
  • Exec format error android