Bundler install memory error
When i install gems via bundler i get an "Cannot allocate memory" error. Specific one this time is the following:
/home/bee/.rvm/gems/ruby-2.2.4@gemset/gems/bundler-1.12.3/lib/bundler/source/git/git_proxy.rb:149:in``': Cannot allocate memory - git (Errno::ENOMEM)
Expected result is obviously that the gems get installed.
My windows build number is 14393.51
To reproduce you need to install rvm following the guide from the website and then install bundler via gem install bundler. After that install some gems from gemfile via "bundle install"
I already see that there are some other issues with the "allocate memory" error but they dont work for me. Maybe somebody knows what to do
Could you type free on a just opened bash window and post what it shows?
What is the size of your Windows pagefile? I had to increase mine to 2.5 GB to stop getting the "Cannot allocate memory" errors.
I'm having the same issue. Here is the output of the free command on a fresh bash window:
total used free shared buffers cached
Mem: 3884696 2704944 1179752 17720 34032 188576
-/+ buffers/cache: 2482336 1402360
Swap: 1441792 96304 1345488
Setting my pagefile to 2.5 GB, as suggested by @JasonLinMS, worked. Changing this parameter is a pain. Here's how I found it:
Control Panel > System and Security > System > Advanced System Settings > Advanced > Performance Settings ... > Advanced > Virtual Memory Change...
Then uncheck automatic paging file box and enter a custom min and starting size of 2500.
After rebooting my free command produces this output:
total used free shared buffers cached
Mem: 3884696 2677996 1206700 17720 34032 188576
-/+ buffers/cache: 2455388 1429308
Swap: 2560000 35424 2524576
I'm currently receiving this issue with 2999MB allocated as my swap.
The free command results in:
total used free shared buffers cached
Mem: 8312940 6149696 2163244 17720 34032 188576
-/+ buffers/cache: 5927088 2385852
Swap: 3014656 182680 2831976
Awesome also put a fixed page file and it works fine now 👍
Marking this as a duplicate of #851 - see my comment about the incoming fix https://github.com/Microsoft/BashOnWindows/issues/851#issuecomment-264314420
Any way to fix this?
Hi @aurimus -- @benhillis claims that this is fixed in a recent Insider build.
Confirm, after windows update it worked!