【问题标题】:got error when run cmd RAILS_ENV=production bundle exec rake assets:precompile运行 cmd RAILS_ENV=production bundle exec rake assets:precompile 时出错
【发布时间】:2019-10-12 21:19:00
【问题描述】:

我正在尝试将 manageiq 开发模式转换为生产模式,所以我应用了预编译 cmd 并得到了错误

ExecJS::RuntimeError: SyntaxError: Unexpected token: operator (>) (行:2221,列:46,位置:3996497)

错误 在新的 JS_Parse_Error (/tmp/execjs20190527-22386-1jyom7qjs:3623:11948) 在 js_error (/tmp/execjs20190527-22386-1jyom7qjs:3623:12167) 在 croak (/tmp/execjs20190527-22386-1jyom7qjs:3623:22038) 在 token_error (/tmp/execjs20190527-22386-1jyom7qjs:3623:22175) 在意外 (/tmp/execjs20190527-22386-1jyom7qjs:3623:22263) 在 expr_atom (/tmp/execjs20190527-22386-1jyom7qjs:3623:31244) 在 Maybe_unary (/tmp/execjs20190527-22386-1jyom7qjs:3624:1752) 在 expr_ops (/tmp/execjs20190527-22386-1jyom7qjs:3624:2523) 在maybe_conditional (/tmp/execjs20190527-22386-1jyom7qjs:3624:2615) 在 maybe_assign (/tmp/execjs20190527-22386-1jyom7qjs:3624:3058)

manageiq 在开发模式下正确运行,但无法预编译资产(由 JS、CSS 文件组成)

manageIq 应该可以正确编译并且应该在生产模式下启动并生成生产日志

【问题讨论】:

    标签: ruby-on-rails manageiq


    【解决方案1】:

    请尝试以下方法:

    cd /var/www/miq/vmdb
    bin/update
    

    rake assets:precompile 只是需要发生的事情的一部分,bin/update 可以做到这一点以及许多其他事情。

    【讨论】:

    • 得到答案以在production.rb中进行更改以忽略js文件转换
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多