Undumpable Exception -- #<RuntimeError:_canvas:compile_assets

850 views
Skip to first unread message

F VB

unread,
Jan 4, 2015, 5:07:17 PM1/4/15
to canvas-l...@googlegroups.com
Hi

Upgrading Canvas release 20-12-2014.
Proces: Compiled Assets

First error:
--> Generating
Undumpable Exception -- #<RuntimeError: unwrappable content error on line 6. "multiple text nodes in html markup"
See below: workaround (first error)

Second error:
--> Starting: 'i18n:generate_js'
key as scope on line 15: "quizzes.quiz.moderate"
app/coffeescripts/ember/quizzes/templates/quiz/moderate.hbs



Environment
Ubuntu 14.04
$ gem --version
1.8.23.2

$bundle --version
Bundler version 1.7.2

$ npm install
Succesful

$ bundle exec rake canvas:compile_assets

> Executing file: 
/var/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js

> Source file:
/var/canvas/public/app/coffeescripts/ember/quizzes/templates/quiz/statistics/questions/multiple_choice/discrimination_index_help.hbs
{{#message-dialog
  fix-dialog-buttons=true
  height=270
  title=discriminationIndexHelpDialogTitle}}

  {{#t 'discrimination_index_help'}}
    <p>
      This metric provides a measure of how well a single question can tell the
      difference (or discriminate) between students who do well on an exam and
      those who do not.

      It divides students into three groups based on their score on the whole
      quiz and displays those groups by who answered the question correctly.
    </p>

    <p>
      More information is available <a target="_blank" href="http://guides.instructure.com/m/4152/l/41484-once-i-publish-my-quiz-what-kinds-of-quiz-statistics-are-available">here</a>.
    </p>
  {{/t}}
{{/message-dialog}}


> Target js file:
/var/canvas/public/javascripts/compiled/ember/quizzes/templates/quiz/statistics/questions/multiple_choice/discrimination_index_help.js

Workaround first error:
When I removed the Achor tag  'generating' is succesfully.


Second error:
--> Starting: 'i18n:generate_js'
key as scope on line 15: "quizzes.quiz.moderate"
app/coffeescripts/ember/quizzes/templates/quiz/moderate.hbs


Does not make sense to me
Can anyone give me some advice?

Regards
Fred

++++++++++++++++++++++++++++

Stdout:
fred@herft:/var/canvas$ bundle exec rake canvas:compile_assets
/var/canvas/gems/utf8_cleaner/lib/utf8_cleaner.rb:20:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /var/canvas/Rakefile:11)
working in 4 processes
--> Starting: 'css:styleguide'--> Starting: 'compile coffee, js 18n, and run r.js optimizer'--> Starting: 'Compile sass and make jammit css bundles'


--> Starting: 'npm run compile-sass'--> Starting: 'js:generate'

--> creating styleguide
Building client app 'canvas_quiz_statistics'
    Running 'npm install'...
--> Starting: 'Generate documentation [yardoc]'

> canva...@0.0.0 compile-sass /var/canvas
> node script/compile-sass.js

    Running 'npm run build'...
Client app 'canvas_quiz_statistics' was built successfully.
--> Generating plugin extensions
--> Generating plugin extensions finished in 0.000952639
--> Creating ember app bundles
--> Pre-compiling ember handlebars templates
--> Compiling React JSX
--> Pre-compiling handlebars templates
--> Creating ember app bundles finished in 0.103471852
--> Compiling CoffeeScript with coffee-script gem
--> Compiling React JSX finished in 2.684813963
# writing file: app/views/info/styleguide.html.erb
--> Finished: 'css:styleguide' in 7.95417376
--> Pre-compiling handlebars templates finished in 14.362476081
Files:          91
Modules:         0 (    0 undocumented)
Classes:        90 (   26 undocumented)
Constants:       0 (    0 undocumented)
Methods:       381 (    7 undocumented)
 92.99% documented
API Documentation successfully generated in public/doc/api
See public/doc/api/index.html
--> Finished: 'Generate documentation [yardoc]' in 43.557696235
--> Finished: 'npm run compile-sass' in 53.157307652
--> Starting: 'Jammit'
--> Finished: 'Jammit' in 0.634109798
--> Finished: 'Compile sass and make jammit css bundles' in 53.791600453
rake aborted!
Undumpable Exception -- #<RuntimeError: unwrappable content error on line firstLine=6 -- firstColumn=36 -- lastColumn=2 -- lastLine=18 -- type=content -- string=
Debug output:
    <p>
      This metric provides a measure of how well a single question can tell the
      difference (or discriminate) between students who do well on an exam and
      those who do not.

      It divides students into three groups based on their score on the whole
      quiz and displays those groups by who answered the question correctly.
    </p>
    <p>
      More information is available <a target="_blank" href="http://guides.instructure.com/m/4152/l/41484-once-i-publish-my-quiz-what-kinds-of-quiz-statistics-are-available">here</a>.
    </p>

   -- : "multiple text nodes in html markup">/var/canvas/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:173:in `work_in_processes'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:55:in `map'
/var/canvas/lib/tasks/canvas.rake:167:in `block (3 levels) in <top (required)>'
/var/canvas/lib/tasks/canvas.rake:166:in `block (2 levels) in <top (required)>'
Tasks: TOP => canvas:compile_assets
(See full trace by running task with --trace)
$

Cody Cutrer

unread,
Jan 5, 2015, 12:11:25 PM1/5/15
to canvas-l...@googlegroups.com
I'm pretty sure this error means that there are old files left over from the previous version of Canvas. Try running `git status` and look for untracked files to remove (or use `git clean` to remove them).

Cody Cutrer
Software Engineer
Instructure

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Graham Ballantyne

unread,
Jan 5, 2015, 12:12:49 PM1/5/15
to canvas-l...@googlegroups.com
That's my experience; we ran into this when our build system wasn't cleaning up after itself and left old files kicking around. Nuking them resolved the error.

– Graham

Christopher Bennell

unread,
Jan 6, 2015, 9:32:09 AM1/6/15
to canvas-l...@googlegroups.com
Hey Graham, 
Is your cleanup process a Capistrano task? If so, where does it live? I dug around in your repo but didn't find where your "meta_tasks" are defined. 

Thanks!

Graham Ballantyne

unread,
Jan 6, 2015, 1:49:37 PM1/6/15
to canvas-l...@googlegroups.com
No - we use Bamboo to do the actual build and deploy; it is supposed to clean up after itself, but because it's an Atlassian product, it doesn't do what it's told to do on a fairly regular basis.

Our B&D process looks like this now:

- bamboo checks out the sfu/canvas-lms, instructure/qtimigrationtool and instructure/analytics repos
- bamboo bunds bundle install, npm install and compile_assets
- bamboo runs our capistrano recipe, which:
   - tars up the built canvas and ships it over to the cluster nodes
   - runs bundle install again on each node, just in case
   - copies config files
   - runs migrations
   - moves symlinks around
   - does a rolling passenger restart

– Graham

F VB

unread,
Jan 11, 2015, 4:53:23 PM1/11/15
to canvas-l...@googlegroups.com
Thanks Cody and Graham.
Sorry for the late response.

I had  followed de upgrade instructions (wiki), not really thought about what I was doing. Not cleaning /var/canvas.
Preceded by
an installation (ver.18-10-2014) according to
Production Start (wiki) including a copy form git working directory to /var/canvas.

Staps:
- Clean up the canvas production envoironment
see below.
- fresh upgrade (no errors from compile:_assest) incluiding rake db:migrate
- moving files back from /tmp
- restart canvas, redis, progresql, apache (succesful)
- checking and testing
B
ut after a database check, table 'schema_migrations' is not equal to the contents of db/migrate.
The value of the last row in schema_migrations was '20141115100802'  (Reffering to db/migrate xxxxx _drop_broken_quiz_submission_event_partitions.rb)
The db/migrate dir
contains two additional scripts: '20141115282315_add...' and '20141115282316_recreate_quiz....' both reffering to partitions.
What to do with these differences?

Fred.


Staps to clean up the canvas production envoironment:
Removing the dirs and secure some files:
- rm -R app, client_apps, db  (copied  db/structure.sql to /tmp)
- rm -R gems, guard, lib, loom, node_modules, spec, config   (copied config/*.yml to /tmp)
- rm -R script   (copied the modified script files to /tmp
- rm -R public   (copied public/overrides to /tmp)
- rm -R vendor/  (excluding the QTIMigrationTool dir)

- cp canvas (ver. 20-12-2014) to target /var/canvas
- upgrading canvas (install gems + Node modules, compile assets, database migrate, load notifications)
- moving back files from /tmp
- Restart canvas
 

Graham Ballantyne

unread,
Jan 13, 2015, 2:02:40 AM1/13/15
to canvas-l...@googlegroups.com
Stuff like this is why we don't do in-place upgrades at our site. Our structure looks like this:

canvas
├── current -> /var/rails/canvas/releases/20141219223050
├── releases
└── shared

We have a build system that handles checking out the qtimigrationtool and analytics plugins, building assets, etc. It produces a tarball that gets uploaded and extracted into a date-stamped directory in the releases directory (e.g. releases/20141219223050). Config files get copied in from a common location. Uploaded files are stored on an NFS mount and that gets symlinked into place. Once the db migration is done, the "current" symlink gets moved to the new release directory and passenger gets restarted.

There's two advantages to this:
- we don't have to worry about issues with old files sticking around, since each deploy is a fresh checkout
- if something goes wrong, we can rollback to a previous deploy (though we'd have to deal with undoing any DB migrations or restoring from a backup).

--

Fred BICT

unread,
Jan 13, 2015, 4:12:56 PM1/13/15
to canvas-l...@googlegroups.com
Graham, thanks for sharing this!

Not sure about this, but It looks like db:migrate had stopped (migrate partitions) because 'pg_partman' is not installed.


Op zondag 4 januari 2015 23:07:17 UTC+1 schreef Fred BICT:

ryan...@gmail.com

unread,
Feb 6, 2015, 4:25:26 PM2/6/15
to canvas-l...@googlegroups.com
HI all,

I checked out canvas from Git today - on a completely fresh server instance (rackspace, Ubuntu 12.04). I'm getting this error as well - but no old files kicking around so far as I can tell!

I have followed the instruction procedure to a t (https://github.com/instructure/canvas-lms/wiki/Production-Start) and made necessary changes where suggested to do with known conflicts/issues.

Does anyone have any additional advice here? 

rake aborted!

Undumpable Exception -- #<EOFError: end of file reached>

/var/canvas/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:173:in `work_in_processes'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:55:in `map'

/var/canvas/lib/tasks/canvas.rake:167:in `block (3 levels) in <top (required)>'

/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'

/var/canvas/lib/tasks/canvas.rake:166:in `block (2 levels) in <top (required)>'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'

/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'

/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'

/var/canvas/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'

/var/canvas/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'

Tasks: TOP => canvas:compile_assets


- ryan

ryan...@gmail.com

unread,
Feb 6, 2015, 4:32:06 PM2/6/15
to canvas-l...@googlegroups.com, ryan...@gmail.com
Also,

ran git status and found this:


# On branch stable

nothing to commit (working directory clean)

- ryan

Jon Jensen

unread,
Feb 7, 2015, 4:11:58 PM2/7/15
to canvas-l...@googlegroups.com, ryan...@gmail.com
Ryan,

Have you run `npm install` ? You might also need to `cd client_apps/canvas_quizzes && npm install`.

One more thing to try would be to run the individual tasks in canvas:compile_assets to see which one is failing ... so that'd be:

* npm run compile-sass
* bin/rails runner 'require "jammit"; Jammit.package!'
* bin/rake css:styleguide
* bin/rake js:generate
* bin/rake i18n:generate_js
* bin/rake js:build
* bin/rake doc:api

Jon

Ryan Sain

unread,
Feb 7, 2015, 10:29:53 PM2/7/15
to canvas-l...@googlegroups.com, ryan...@gmail.com
Jon,

Thanks for the reply and ideas.

Yes I did run npm install. All was successful. The whole thing started getting more confusing so I changed thinking all together. 

I ran a free mem test and found that my system was maxed out. So I am working on a clean install on an improved server. I'm sure I made a mistake during the install process. So this will give me a chance to fix.

Thanks for your advice, if it hangs again at that point I'll continue with your suggestions and reply here. 

- ryan
Reply all
Reply to author
Forward
0 new messages