2

I am trying to set up a canvas lms on an amazon ec2 Ubuntu environment. I've gone so far until the file generation step of the production environment guide. I've been able to successfully follow the steps until this point.

Steps to reproduce:

I was successful in making the asset directories and taking their ownership as directed in this step:

sysadmin@appserver:~$ cd /var/canvas 
sysadmin@appserver:/var/canvas$ mkdir -p log tmp/pids public/assets    public/stylesheets/compiled 
sysadmin@appserver:/var/canvas$ touch Gemfile.lock
sysadmin@appserver:/var/canvas$ sudo chown -R canvasuser config/environment.rb log tmp public/assets \ public/stylesheets/compiled Gemfile.lock config.ru`

After this, I run 'npm install'

It is at this point that after getting some deprecated warnings I get stuck at this line:

canvas-lms@0.0.0 preinstall /home/ubuntu/canvas/script/gem_npm install
running npm install for gems/canvas_i18nliner/package.json
running npm install for gems/selinimum/package.json
Killed [      ..] / extract:lodash: sill gunzTarPerm modified mode [ 'fp/getOr.js', 420, 436 ]'

What I've already tried:

First I thought it was an error with the port 9418/tcp not being open. I opened this port through amazon ec2 security group inbound rules. This did not work. Then I tried opening all the ports 1-65000 to fix this. It still did not work.

Additional notes:

From the looks of it, it does not looks like a port issue because the script is able to fetch data in the previous steps. Also from the progress bar it can be seen that the extract is failing only when the last 2 dots are left as the progress bar is shows like this: [ ..]. I'm guessing this is a .js creation erorr.

The documentation provides a link to fix those issues but the description of the steps to follow are not very elaborate there as I can't understand what exactly i need to do. Can someone please look into this and help me? Any help is much appreciated.

The File Generation section in the production guide says to follow this link to fix .js creation issues. The solution I found in this link was to add the following code to the compile_template function found in lib/handlebars/handlebars.rb file. The directory lib/handlebars does not exist in /lib

def compile_template(source, id, plugin=nil)
require 'execjs'
require 'multi_json'

P.S. I downloaded my installation directly from the git repository so no chance of this being missing for some reason :/

Momin Zahid
  • 346
  • 1
  • 3
  • 12
  • What size instance are you using? if its too small its likely getting killed for using more memory than the instance has. – datasage Feb 26 '17 at 22:15
  • I'm using the standard free tier one. – Momin Zahid Feb 27 '17 at 00:53
  • When you are running npm, its doing a lot of dependency resolution. This process is memory intensive. Either enable swap memory or run the install process on a larger instance (you can switch it back down once you are done) – datasage Feb 27 '17 at 00:56
  • I don't think that's the issue, or maybe it was. But without taking this step I got past the npm install with a few warnings, the only worrisome of which I found were: `npm WARN i18nliner-handlebars@0.2.0 requires a peer of i18nliner@~0.1.5 but none was installed.` and `npm WARN i18nliner-handlebars@0.2.0 requires a peer of i18nliner@~0.1.5 but none was installed.` Maybe because of this but now I'm stuck at the `rake canvas:compile_assets` with the error _rake aborted_ right after it says _Compiling CSS_. – Momin Zahid Feb 27 '17 at 01:52

0 Answers0