<tfoot id='3Uig9'></tfoot>

    1. <small id='3Uig9'></small><noframes id='3Uig9'>

      <legend id='3Uig9'><style id='3Uig9'><dir id='3Uig9'><q id='3Uig9'></q></dir></style></legend>
          <bdo id='3Uig9'></bdo><ul id='3Uig9'></ul>
      1. <i id='3Uig9'><tr id='3Uig9'><dt id='3Uig9'><q id='3Uig9'><span id='3Uig9'><b id='3Uig9'><form id='3Uig9'><ins id='3Uig9'></ins><ul id='3Uig9'></ul><sub id='3Uig9'></sub></form><legend id='3Uig9'></legend><bdo id='3Uig9'><pre id='3Uig9'><center id='3Uig9'></center></pre></bdo></b><th id='3Uig9'></th></span></q></dt></tr></i><div id='3Uig9'><tfoot id='3Uig9'></tfoot><dl id='3Uig9'><fieldset id='3Uig9'></fieldset></dl></div>

        将 Rails 应用程序部署到 Heroku 时出现语法错误:ExecJS::RuntimeError: SyntaxE

        Syntax error when deploying Rails app to Heroku: ExecJS::RuntimeError: SyntaxError: Unexpected character(将 Rails 应用程序部署到 Heroku 时出现语法错误:ExecJS::RuntimeError: SyntaxError: Unexpected character) - IT屋-程序员软件开发技术分享社
        <tfoot id='yK4xF'></tfoot>

          1. <i id='yK4xF'><tr id='yK4xF'><dt id='yK4xF'><q id='yK4xF'><span id='yK4xF'><b id='yK4xF'><form id='yK4xF'><ins id='yK4xF'></ins><ul id='yK4xF'></ul><sub id='yK4xF'></sub></form><legend id='yK4xF'></legend><bdo id='yK4xF'><pre id='yK4xF'><center id='yK4xF'></center></pre></bdo></b><th id='yK4xF'></th></span></q></dt></tr></i><div id='yK4xF'><tfoot id='yK4xF'></tfoot><dl id='yK4xF'><fieldset id='yK4xF'></fieldset></dl></div>

            1. <small id='yK4xF'></small><noframes id='yK4xF'>

                  <tbody id='yK4xF'></tbody>

                <legend id='yK4xF'><style id='yK4xF'><dir id='yK4xF'><q id='yK4xF'></q></dir></style></legend>
                  <bdo id='yK4xF'></bdo><ul id='yK4xF'></ul>
                  本文介绍了将 Rails 应用程序部署到 Heroku 时出现语法错误:ExecJS::RuntimeError: SyntaxError: Unexpected character的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试将我的应用程序部署到 Heroku,但它向我抛出了这个错误.

                  I am trying to deploy my app to Heroku but its throwing me this error.

                  "ExecJS::RuntimeError: SyntaxError: Unexpected character '`' (line:14577,列:33,位置:440811"

                  "ExecJS::RuntimeError: SyntaxError: Unexpected character '`' (line: 14577, col: 33, pos: 440811"

                  我认为coffeescript/javascript 有问题.我已经删除了所有的咖啡脚本文件,但我不知道自己做错了什么.

                  I assume there is something wrong with the coffeescript/javascript. I have deleted all of my coffeescript files and I dont know what I'm doing wrong.

                  按照 Iceman 的建议,我尝试运行该命令

                  As suggested by Iceman, ive tried running the command

                  rake assets:预编译 RAILS_ENV=development

                  rake assets:precompile RAILS_ENV=development

                  它说

                  我,[2017-01-26T16:32:25.173928 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/circle->cb2239e32deac2eba5c693c3574b562595f1f933a88968866e47c170我,[2017-01-26T16:32:25.209986 #2674] INFO -- : 写作 >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fb->e361b3ecca9c24c6c05646b170fe25fcc185fa2eafb7aa46780253c8a9c790a我,[2017-01-26T16:32:25.225079 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/los->f083228761f6ede67e04a1a73906b4585bc5cfd3154ffec48261c4f04cf95aa3.jpg我,[2017-01-26T16:32:25.253212 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/main->221235002689ad3847a67a05ce3608ebed4ee709be6fcf61bc0ccef2001b487f.jpg我,[2017-01-26T16:32:25.272155 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/us-background-638489d758e08327ad62f883f11397bc870df84038b502ea147c3e2510cac我,[2017-01-26T16:32:25.313969 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/zaisan-5f83c22eef3372c96199aad34ab9ad1744d6124e845a01267fcabcec39e2e948.jpg我,[2017-01-26T16:32:25.426829 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-cadb51eb7487d2788eae31912fc18cc28ffaf8d48ea022d2a8a49c121415d7f8.js我,[2017-01-26T16:32:25.427380 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-cadb51eb7487d2788eae31912fc18cc28ffaf8d48ea022d2a8a49c121415d7f8.js.我,[2017-01-26T16:32:25.540537 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-8b6461ded0e51f6232fa5606fc47c47cd9b64684fbbeccd9fed16d7a0a66deee.css我,[2017-01-26T16:32:25.540807 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-8b6461ded0e51f6232fa5606fc47c47cd9b64684fbbeccd9fed16d7a0a66deee.css.我,[2017-01-26T16:32:25.543684 #2674] 信息 -- : 写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b27我,[2017-01-26T16:32:25.597933 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b27.我,[2017-01-26T16:32:25.601098 #2674] 信息——:写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33daoff31我,[2017-01-26T16:32:25.638449 #2674] 信息——:写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa227408a8a753我,[2017-01-26T16:32:25.675384 #2674] 信息 -- : 写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a0933335806694ecdfd6d6d我,[2017-01-26T16:32:25.716776 #2674] 信息 -- : 写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a0933335806694ecdf.g46d我,[2017-01-26T16:32:25.721169 #2674] 信息 -- : 写作/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945e我,[2017-01-26T16:32:25.808396 #2674] INFO -- : Writing/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d94g.f>

                  I, [2017-01-26T16:32:25.173928 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/circle->cb2239e32deac2eba5c693c3574b562595f1f933a8896866e47c170bf87c77e4.png I, [2017-01-26T16:32:25.209986 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/fb->e361b3ecca9c24c6c05646b170fe25fcc185fa2eafb7aa46780253c8a9c79a04.png I, [2017-01-26T16:32:25.225079 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/los->f083228761f6ede67e04a1a73906b4585bc5cfd3154ffec4861c4f04cf95aa32.jpg I, [2017-01-26T16:32:25.253212 #2674] INFO -- : Writing >/Users/Gana/Documents/bombay/bombaydarbar/public/assets/main->221235002689ad3847a67a05ce3608ebed4ee709be6fcf61bc0ccef2001b487f.jpg I, [2017-01-26T16:32:25.272155 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/us-background-638489d758e08327ad62f883f11397bc870df84038b502ea17c3e2510cac6ef4.jpg I, [2017-01-26T16:32:25.313969 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/zaisan-5f83c22eef3372c96199aad34ab9ad1744d6124e845a01267fcabcec39e2e948.jpg I, [2017-01-26T16:32:25.426829 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-cadb51eb7487d2788eae31912fc18cc28ffaf8d48ea022d2a8a49c121415d7f8.js I, [2017-01-26T16:32:25.427380 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-cadb51eb7487d2788eae31912fc18cc28ffaf8d48ea022d2a8a49c121415d7f8.js.gz I, [2017-01-26T16:32:25.540537 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-8b6461ded0e51f6232fa5606fc47c47cd9b64684fbbeccd9fed16d7a0a66deee.css I, [2017-01-26T16:32:25.540807 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/application-8b6461ded0e51f6232fa5606fc47c47cd9b64684fbbeccd9fed16d7a0a66deee.css.gz I, [2017-01-26T16:32:25.543684 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot I, [2017-01-26T16:32:25.597933 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot.gz I, [2017-01-26T16:32:25.601098 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2 I, [2017-01-26T16:32:25.638449 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff I, [2017-01-26T16:32:25.675384 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf I, [2017-01-26T16:32:25.716776 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf.gz I, [2017-01-26T16:32:25.721169 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg I, [2017-01-26T16:32:25.808396 #2674] INFO -- : Writing /Users/Gana/Documents/bombay/bombaydarbar/public/assets/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg.gz

                  我的图片文件有问题吗?

                  is there something wrong with my image files?

                  推荐答案

                  正如一些用户提到的,问题是 Rails JS uglifier 无法处理 ES6 模板文字.

                  The problem, as some of the users has mentioned, is Rails JS uglifier not being able to handle ES6 template literals.

                  Uglifier 现在具有支持 ES6/ES2015+ 语法的 Harmony 模式.

                  Uglifier now has a Harmony mode which supports ES6 / ES2015+ syntax.

                  您可以通过传递 :harmony => 来启用它.true 选项到 Uglifier.

                  You can enable it by passing :harmony => true option to Uglifier.

                  打开config/environments/production.rb

                  替换

                  config.assets.js_compressor = :uglifier
                  

                  config.assets.js_compressor = Uglifier.new(harmony: true)
                  

                  这篇关于将 Rails 应用程序部署到 Heroku 时出现语法错误:ExecJS::RuntimeError: SyntaxError: Unexpected character的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  Ordinals in words javascript(javascript中的序数)
                  getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  How to use coffeescript in developing web-sites?(如何在开发网站时使用coffeescript?)
                  • <small id='iXHKs'></small><noframes id='iXHKs'>

                      <tbody id='iXHKs'></tbody>

                      <i id='iXHKs'><tr id='iXHKs'><dt id='iXHKs'><q id='iXHKs'><span id='iXHKs'><b id='iXHKs'><form id='iXHKs'><ins id='iXHKs'></ins><ul id='iXHKs'></ul><sub id='iXHKs'></sub></form><legend id='iXHKs'></legend><bdo id='iXHKs'><pre id='iXHKs'><center id='iXHKs'></center></pre></bdo></b><th id='iXHKs'></th></span></q></dt></tr></i><div id='iXHKs'><tfoot id='iXHKs'></tfoot><dl id='iXHKs'><fieldset id='iXHKs'></fieldset></dl></div>

                        <tfoot id='iXHKs'></tfoot>
                          <legend id='iXHKs'><style id='iXHKs'><dir id='iXHKs'><q id='iXHKs'></q></dir></style></legend>
                          • <bdo id='iXHKs'></bdo><ul id='iXHKs'></ul>