开发者

How do I specify heap size configuration in a config file

开发者 https://www.devze.com 2023-03-25 19:11 出处:网络
gem install fails with the following error, How do I specify the heap size configuration in a common place so that I don\'t have to re-define this every time.

gem install fails with the following error, How do I specify the heap size configuration in a common place so that I don't have to re-define this every time.

Error: Your application used more memory than the safety cap 开发者_StackOverflowof 500m.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace.


This error and message are actually coming from jruby, not gem. Fortunately, jruby checks for default options in the JRUBY_OPTS environment variable.

So, try export JRUBY_OPTS=-J-Xmx1024m, and then, whenever you call gem install, jruby should automatically run with a 1024MB memory cap.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号