2016-04-22 72 views
0

我已在Ubuntu服务器(1 GB内存/ 30 GB磁盘/ NYC2 - Ubuntu 14.04.4 x64)上成功安装JRuby 9.0.5.0。在我尝试安装一些宝石时,在命令提示符下。例如捆绑JRuby对于Java运行时环境的内存不足

gem install bundle 

它返回内存不足错误:

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00, 65536, 1) failed; error='Cannot allocate memory' (errno=12) 
# 
# There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (malloc) failed to allocate 65536 bytes for committing reserved memory. 

我怎样才能提高,以安装所需的宝石内存设置?

您的帮助表示赞赏。

回答

1

你增加头部的Java方式,前缀为-J ...例如-J-Xmx624M

这样说的JRuby(< = 9.0.5至少)自动设定500MB帽,这似乎是相关的分配本机内存。很难分辨究竟发生了什么,也许如果还有其他进程在运行,那么JRuby无法启动和加载RG(在gem install ...上)