diff options
author | Lars Kanis <kanis@comcard.de> | 2017-07-31 14:59:11 +0200 |
---|---|---|
committer | Lars Kanis <lars@greiz-reinsdorf.de> | 2017-08-01 21:17:20 +0200 |
commit | dd439bfbda2a39b305b13f00c40d07c6a8c46d8c (patch) | |
tree | a92c8ad7da79b80769019fa5afdda826332ed5f3 /railties/lib | |
parent | 090eaa7e1b42143ffdb42409aa5d429cbeb3e55d (diff) | |
download | rails-dd439bfbda2a39b305b13f00c40d07c6a8c46d8c.tar.gz rails-dd439bfbda2a39b305b13f00c40d07c6a8c46d8c.tar.bz2 rails-dd439bfbda2a39b305b13f00c40d07c6a8c46d8c.zip |
Use duktape gem as default JS engine on Windows-MINGW and MS-Visual-C builds
The fallback javascript engine on Windows is Windows Script Host (JScript).
However this engine isn't able to process the default assets, because it supports
ES3 only but the coffeescript compiler requires ES5.
Fixes #30014
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 760cb2f81e..4899a63917 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -348,6 +348,8 @@ module Rails comment = "See https://github.com/rails/execjs#readme for more supported runtimes" if defined?(JRUBY_VERSION) GemfileEntry.version "therubyrhino", nil, comment + elsif RUBY_PLATFORM =~ /mingw|mswin/ + GemfileEntry.version "duktape", nil, comment else GemfileEntry.new "mini_racer", nil, comment, { platforms: :ruby }, true end |