我已经成功地在Ubuntu服务器上安装了JRuby 9.0.5.0 (1 GB内存/ 30 GB磁盘/ NYC2 -Ubuntu14.04.4 x64)。在命令提示符下,当我尝试安装一些gem时。例如bundler
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.如何增加内存设置以安装所需的gem?
非常感谢您的帮助。
发布于 2016-04-25 20:08:36
以-J为前缀增加head的Java way ...例如-J-Xmx624M
也就是说,JRuby (至少是<= 9.0.5 )会自动设置500MB的上限,这似乎与分配本机内存有关。很难说到底是怎么回事,也许是因为有其他进程在运行,没有足够的内存让JRuby启动和加载RGs (在gem install ...上)
https://stackoverflow.com/questions/36789627
复制相似问题