Error installing rdoc

Hi tried to install Juniper on a Cloud instance (Iaas Ubuntu 16.04) with 4Gb Ram, following native installation guide
and I get this error running native.sh :

BUILD FAILED (Ubuntu 16.04 using ruby-build 20200520)

Inspect or clean up the working tree at /tmp/ruby-build.20200615225509.10053.nXbqf0
Results logged to /tmp/ruby-build.20200615225509.10053.log

Last 10 log lines:
 99% [867/871]  vm_exec.c
 99% [868/871]  vm_insnhelper.c
 99% [869/871]  vm_method.c
 99% [870/871]  vm_trace.c
100% [871/871]  vsnprintf.c

Generating RI format into /tmp/ruby-build.20200615225509.10053.nXbqf0/ruby-2.5.7/.ext/rdoc...
Killed
uncommon.mk:491: recipe for target 'rdoc' failed
make: *** [rdoc] Error 137
 
============================================================
Installation failed!

I don’t recognize that output, what produced it? Can you tell us all the steps you executed? Can you pastebin the full installation log?

Hello,
the problem was caused by lack of memory. We indeed need 8gb ram as stated in documentation (sorry for not having paid attention).
Output was produced by native.sh

Also, we could maybe add a modification in /edx/app/edx_ansible/edx_ansible/playbooks/roles/rbenv/tasks/main.yml , l.150 , from:

shell: “rbenv install {{ rbenv_ruby_version }} creates={{ rbenv_dir }}/.rbenv/versions/{{ rbenv_ruby_version }}”

to

shell: “RUBY_CONFIGURE_OPTS=–disable-install-doc rbenv install {{ rbenv_ruby_version }} creates={{ rbenv_dir }}/.rbenv/versions/{{ rbenv_ruby_version }}”

See related issue https://github.com/postmodern/ruby-install/issues/223

With a 8Gb machine tough, the problem is solved and I could install OpenEdx Juniper.

Thank you

Glad you found the problem. That change in configuration looks like a good candidate for a pull request… :slight_smile:

Sure, I will try it first on a 4Gb Ram env. and then make the pull request and let you know.

Hi tried disabling doc install for ruby, and it worked in a 4Gb machine.

However, it fails later with:

TASK [rbenv : set global ruby 2.5.7] ******************************************************************************************************************************************************************************
changed: [localhost]

TASK [rbenv : update rubygems] ************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "gem update --system 2.7.8", "delta": "0:00:19.577035", "end": "2020-06-17 19:48:03.807484", "msg": "non-zero return code", "rc": 137, "start": "2020-06-17 19:47:44.230449", "stderr": "Killed", "stderr_lines": ["Killed"], "stdout": "", "stdout_lines": []}
	to retry, use: --limit @/var/tmp/configuration/playbooks/openedx_native.retry

PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost                  : ok=515  changed=353  unreachable=0    failed=1   

 
============================================================
Ansible failed!
------------------------------------------------------------
 
Decoded error:
== cmd ===========================
gem update --system 2.7.8
== msg ===========================
non-zero return code
== stderr ===========================
Killed
 
============================================================
Installation failed!
------------------------------------------------------------

Here again, memory seems to be overloaded. Here free -h just after the error:

admin@edx2:~/openedx$ free -h
              total        used        free      shared  buff/cache   available
Mem:           3.9G        3.3G        440M        8.0M        162M        507M
Swap:          4.7G        4.7G        9.3M

I could finally install openedx with only 4Gb Ram, and without changing Ruby options,

but I had to increase my Swap to 8Gb.

If useful…