- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试编译我的 javascript 资源。我已经包含了plotly.js 文件,大小几乎为2MB。我还包含了 angualr2.dev.js 文件,该文件的大小也是 1MB。
每当我使用命令 rake asset:precompile RAILS_ENV=product
编译我的 Assets 时,我都会遇到以下错误。
Java::JavaLang::OutOfMemoryError: Java heap space
org.mozilla.javascript.NativeArray.<init>(org/mozilla/javascript/NativeArray.jav
a:66)
org.mozilla.javascript.Context.newArray(org/mozilla/javascript/Context.java:1626
)
org.mozilla.javascript.ScriptRuntime.newArrayLiteral(org/mozilla/javascript/Scri
ptRuntime.java:3733)
org.mozilla.javascript.Interpreter.interpretLoop(org/mozilla/javascript/Interpre
ter.java:1776)
org.mozilla.javascript.Interpreter.interpret(org/mozilla/javascript/Interpreter.
java:815)
org.mozilla.javascript.InterpretedFunction.call(org/mozilla/javascript/Interpret
edFunction.java:109)
org.mozilla.javascript.NativeArray.iterativeMethod(org/mozilla/javascript/Native
Array.java:1635)
org.mozilla.javascript.NativeArray.execIdCall(org/mozilla/javascript/NativeArray
.java:330)
org.mozilla.javascript.IdFunctionObject.call(org/mozilla/javascript/IdFunctionOb
ject.java:97)
org.mozilla.javascript.Interpreter.interpretLoop(org/mozilla/javascript/Interpre
ter.java:1479)
org.mozilla.javascript.Interpreter.interpret(org/mozilla/javascript/Interpreter.
java:815)
org.mozilla.javascript.InterpretedFunction.call(org/mozilla/javascript/Interpret
edFunction.java:109)
org.mozilla.javascript.NativeArray.iterativeMethod(org/mozilla/javascript/Native
Array.java:1635)
org.mozilla.javascript.NativeArray.execIdCall(org/mozilla/javascript/NativeArray
.java:330)
org.mozilla.javascript.IdFunctionObject.call(org/mozilla/javascript/IdFunctionOb
ject.java:97)
org.mozilla.javascript.Interpreter.interpretLoop(org/mozilla/javascript/Interpre
ter.java:1479)
org.mozilla.javascript.Interpreter.interpret(org/mozilla/javascript/Interpreter.
java:815)
org.mozilla.javascript.InterpretedFunction.call(org/mozilla/javascript/Interpret
edFunction.java:109)
org.mozilla.javascript.NativeArray.iterativeMethod(org/mozilla/javascript/Native
Array.java:1635)
org.mozilla.javascript.NativeArray.execIdCall(org/mozilla/javascript/NativeArray
.java:330)
org.mozilla.javascript.IdFunctionObject.call(org/mozilla/javascript/IdFunctionOb
ject.java:97)
org.mozilla.javascript.Interpreter.interpretLoop(org/mozilla/javascript/Interpre
ter.java:1479)
org.mozilla.javascript.Interpreter.interpret(org/mozilla/javascript/Interpreter.
java:815)
org.mozilla.javascript.InterpretedFunction.call(org/mozilla/javascript/Interpret
edFunction.java:109)
org.mozilla.javascript.NativeArray.iterativeMethod(org/mozilla/javascript/Native
Array.java:1635)
org.mozilla.javascript.NativeArray.execIdCall(org/mozilla/javascript/NativeArray
.java:330)
org.mozilla.javascript.IdFunctionObject.call(org/mozilla/javascript/IdFunctionOb
ject.java:97)
org.mozilla.javascript.Interpreter.interpretLoop(org/mozilla/javascript/Interpre
ter.java:1479)
org.mozilla.javascript.Interpreter.interpret(org/mozilla/javascript/Interpreter.
java:815)
org.mozilla.javascript.InterpretedFunction.call(org/mozilla/javascript/Interpret
edFunction.java:109)
org.mozilla.javascript.NativeArray.iterativeMethod(org/mozilla/javascript/Native
Array.java:1635)
org.mozilla.javascript.NativeArray.execIdCall(org/mozilla/javascript/NativeArray
.java:330)
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
我该如何解决这个问题?
最佳答案
尝试使用备用 ExecJS 运行时进行预编译(例如安装了 node
)
...而不是gem 'therubyrhino'
关于java - jruby Rails:Java::JavaLang::OutOfMemoryError:Java 堆空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40465589/
在 tomcat 内的 jruby/rack 中使用 jruby 时,如何/在哪里为 jruby 设置 --fast 模式? 此 --fast 模式在此页面中进行了说明 jruby performan
任何教程或博客都可以从 JRuby on Rails 开始 哪个指导我安装和小型 JRuby on Rails 应用程序? 我已经浏览了本演练和教程(https://github.com/jruby/
无法使用 jruby 启动 rails5,出现以下错误。 gavinyap@gavin-ubuntu ~/Development/rails5app rails s DEPRECATION W
我制作了一个 NSIS 脚本来为 Rails 应用程序创建安装程序。该应用程序使用 JRuby 和 Java。 在安装程序的第一部分中,我设置了环境变量:我将 jruby\bin 添加到 PATH 并
当我的 jruby 程序意外启动并向我提供堆栈跟踪时,这几乎是不可理解的。它充满了显然来自内部解释器的行,这让我很难弄清楚我的实际程序的实际调用堆栈是什么。 类似的东西(只是摘录): from
如何/在何处为在 jruby-rack/tomcat 中运行的 jruby 设置 --profile.api 选项? 此选项记录在如何分析代码块中 here 最佳答案 使用 JRUBY_OPTS 将无
我无法让 jruby 在没有 hack 的情况下使用 Rails 4: 在 railties/lib/rails/engine.rb 中,我必须用 const_get 初始化 Railties,否则
我需要将我的 JRuby 应用程序编译成一个独立的 JAR 文件。我怎样才能做到这一点? 最佳答案 Warbler 1.3.0 或更新版本也可用于制作可执行 JAR 文件。 快速说明。确保您在此处使用
我正在尝试将 Rails 应用程序转换为 jruby on Rails。目前,jruby script/delayed_job run给出: /usr/lib/jruby/lib/ruby/gems/
我通过在 config/application.rb 中添加了一些外部 jar 到我的 CLASSPATH : require 'java' $CLASSPATH << "#{File.dirname
目前在 Jruby 中编写类似的 java 类时遇到问题。 示例: 在 Java 中: public class Client extends ClientConnection { //do s
jruby 1.7.23 (1.9.3p551) 2015-11-24 f496dd5 在 Java HotSpot(TM) 64 位服务器 VM 1.7.0_79-b15 +jit [Windows
我正在尝试通过最新版本的 Jruby (1.5.1)、Ruby 1.8.7 和 Java 1.6.0_06 执行一些自定义 Java 代码。我已经尝试了类文件并将其放入 jar 方法中。当我尝试 re
文档似乎表明,为了将 Java 类导入到 JRuby 中,它们必须位于 JAR 文件中: “为了使用 JRuby 中的 jar 文件中的资源,jar 文件必须位于类路径上,或者您可以使用 requir
我在 Windows/JRuby 上使用 watir-webdriver。我的开发一直使用 Firefox。 Watir::Browser.new :firefox 对于部署,我需要一个 headle
我正在使用 JRuby 编写 Java 脚本。通过使用 JRebel,我可以自动将更改的 Java 类重新加载到 JRuby JVM 中,而无需重新启动。当我添加一个新的 Java 方法时,JRebe
我试图在 JRuby 中传递一个二进制字符串作为 byte[]通过一些Java库并再次进入JRuby,我想将其转换回字符串,但我无法弄清楚如何在不弄乱字符串的情况下进行操作。 具体来说,我将 Ruby
在Java中运行Ruby脚本时,我们使用ScriptEngine jruby = new ScriptEngineManager().getEngineByName("jruby");,如果只需要调用
当前的 Trinidad gem 依赖于 jruby-rack 1.1.0,它在我的每一项 Assets 的开发日志中显示了一些错误 /Users/bijan/.rvm/gems/jruby-1.7.
环境 JRuby 版本:jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64 位服务器 VM 25.65-b01,位于 1.8.0_
我是一名优秀的程序员,十分优秀!