RAILS_ENV=production bundle exec rake canvas:compile_assets not getting anywhere sass and brandables

926 views
Skip to first unread message

Dustin Chew

unread,
Apr 25, 2016, 8:29:34 AM4/25/16
to Canvas LMS Users
Some information Ubuntu 14.04.4 LTS 
Node version 0.12.13
ruby 2.1.8p440 (2015-12-16 revision 53160) [x86_64-linux-gnu]
gem list

*** LOCAL GEMS ***

bigdecimal (1.2.4)
bundler (1.11.2, 1.7.11)
io-console (0.4.3)
json (1.8.1)
minitest (4.7.5)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
test-unit (2.1.8.0)

I feel like I am hitting a brick wall server has plenty of RAM.


Any extra help would be great

here is the output from RAILS_ENV=production bundle exec rake canvas:compile_assets -- trace
DEPRECATION WARNING: Syck is deprecated and support for serialization has been removed. ActiveRecord::Core#yaml_initialize will be removed in 4.1 which will break deserialization support with Syck. (called from require at /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77)
** Invoke canvas:compile_assets (first_time)
** Execute canvas:compile_assets
--> Starting: 'Making sure node_modules are up to date'
--> Finished: 'Making sure node_modules are up to date' in 8.9280358
--> Starting: 'compile css (including custom brands)'
compiled bundles/all_courses.scss legacy_normal_contrast  in 179 ms
compiled bundles/all_courses.scss new_styles_high_contrast  in 179 ms
compiled bundles/all_courses.scss legacy_high_contrast  in 181 ms
compiled bundles/all_courses.scss new_styles_normal_contrast  in 182 ms
compiled bundles/attendance.scss legacy_normal_contrast  in 178 ms
compiled bundles/attendance.scss legacy_high_contrast  in 178 ms
compiled bundles/attendance.scss new_styles_normal_contrast  in 177 ms
compiled bundles/attendance.scss new_styles_high_contrast  in 177 ms
error compiling sass { [Error: Import directives may not be used within control directives or mixins.]
  cause:
   { [Error: Import directives may not be used within control directives or mixins.]
     formatted: 'Error: Import directives may not be used within control directives or mixins.\n        on line 32 of app/stylesheets/base/_variables.scss\n>>   @import "brand_variables";\n   --^\n',
     message: 'Import directives may not be used within control directives or mixins.',
     column: 3,
     line: 32,
     file: 'app/stylesheets/base/_variables.scss',
     status: 1 },
  isOperational: true,
  formatted: 'Error: Import directives may not be used within control directives or mixins.\n        on line 32 of app/stylesheets/base/_variables.scss\n>>   @import "brand_variables";\n   --^\n',
  column: 3,
  line: 32,
  file: 'app/stylesheets/base/_variables.scss',
  status: 1 } Error: Import directives may not be used within control directives or mixins.
    at options.error (/var/canvas/node_modules/brandable_css/node_modules/node-sass/lib/index.js:271:32) Import directives may not be used within control directives or mixins.
rake aborted!
Error running BrandableCSS CLI: ./node_modules/.bin/brandable_css
/var/canvas/lib/brandable_css.rb:187:in `block in run_cli!'
/usr/lib/ruby/2.1.0/open3.rb:199:in `popen_run'
/usr/lib/ruby/2.1.0/open3.rb:188:in `popen2e'
/var/canvas/lib/brandable_css.rb:173:in `run_cli!'
/var/canvas/lib/brandable_css.rb:153:in `compile_all!'
/var/canvas/lib/tasks/canvas.rake:123:in `block (3 levels) in <top (required)>'
/usr/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/var/canvas/lib/tasks/canvas.rake:7:in `log_time'
/var/canvas/lib/tasks/canvas.rake:123:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/var/canvas/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => canvas:compile_assets

Clay Diffrient

unread,
Apr 25, 2016, 9:32:53 AM4/25/16
to canvas-l...@googlegroups.com
Dustin,

You’ll want to make sure you have the latest stable branch which contains https://github.com/instructure/canvas-lms/commit/35ec33ed67a34973ec5454f129af33128e329a7b.

That should fix that error for you.

Clay Diffrient | Software Engineer

E: cl...@instructure.com

--

---
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.

Dustin Chew

unread,
Apr 25, 2016, 9:38:11 AM4/25/16
to canvas-l...@googlegroups.com
will I need to start over or just run a simple command.  I am kind of new to git.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Canvas LMS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/canvas-lms-users/5VAD7DUUY70/unsubscribe.
To unsubscribe from this group and all its topics, send an email to canvas-lms-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Dustin C. Chew

Senior Network Engineer

Comptia A+ Depot Technician

Comptia Network+

New Castle Community School Corporation

(765) 593-6691

Clay Diffrient

unread,
Apr 25, 2016, 10:26:32 AM4/25/16
to canvas-l...@googlegroups.com
Should be as simple as `git pull`

Clay Diffrient | Software Engineer

E: cl...@instructure.com


Dustin Chew

unread,
Apr 25, 2016, 10:47:00 AM4/25/16
to canvas-l...@googlegroups.com
got it thanks.

Norge Dario Concepcion Pupo

unread,
Dec 14, 2017, 6:20:06 PM12/14/17
to Canvas LMS Users
Hello:
Did you finally install CANVAS? I am struggling with the same error in UBUNTU 16.04.
Please, I need some help. I am following the Production Start guide and there is error in step
RAILS_ENV=production bundle exec rake canvas:compile_assets
Thanks,

Graham Ballantyne

unread,
Dec 14, 2017, 6:33:52 PM12/14/17
to canvas-l...@googlegroups.com
It would be helpful to know what error you're getting.

Norge Dario Concepcion Pupo

unread,
Dec 16, 2017, 3:08:40 PM12/16/17
to canvas-l...@googlegroups.com
First of all thanks for answering. This is the error that I get after
executing the command RAILS_ENV = production bundle exec rake canvas:
compile_assets.

Schema#resolve_type(type, obj, ctx) with 2 arguments is deprecated, it
now accepts 3 arguments, see:
/var/canvas/app/graphql/canvas_schema.rb:17:in `block in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.4.0/gems/icalendar-1.5.4/lib/icalendar/conversions.rb:38:
warning: constant ::Fixnum is deprecated
/var/canvas/vendor/bundle/ruby/2.4.0/gems/icalendar-1.5.4/lib/icalendar/conversions.rb:44:
warning: constant ::Bignum is deprecated
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:55:
warning: key "rightleftharpoons" is duplicated and overwritten on line
101
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:178:
warning: key "eqslantgtr" is duplicated and overwritten on line 179
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:225:
warning: key "ntrianglelefteq" is duplicated and overwritten on line
229
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/entities.rb:244:
warning: key "nsupseteq" is duplicated and overwritten on line 245
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/functions.rb:94:
warning: key "rowspan" is duplicated and overwritten on line 98
/var/canvas/vendor/bundle/ruby/2.4.0/gems/ritex-1.0.1/lib/ritex/mathml/functions.rb:93:
warning: key "colspan" is duplicated and overwritten on line 99
--> Starting: 'css:compile'
--> no DB connection, skipping generation of brand_config files
rake aborted!
BrandableCSS::DefaultMD5NotUpToDateError:
You have made changes to either
app/stylesheets/brandable_variables.json or one of the images it
references so you need to rename the db migrations that makes sure
when this change is deployed it
makes a new .css file for the css variables for each brand based on
these new defaults.
To do that, run this command and then restart your rails process. (for
local dev, if you want the
changes to show up in the ui, make sure you also run `rake db:migrate`).

mv db/migrate/*_regenerate_brand_files_based_on_new_defaults_predeploy.rb \
db/migrate/940701317156510265337_regenerate_brand_files_based_on_new_defaults_predeploy.rb
\
&& \
mv db/migrate/*_regenerate_brand_files_based_on_new_defaults_postdeploy.rb \
db/migrate/940701317156510265338_regenerate_brand_files_based_on_new_defaults_postdeploy.rb

FYI, current variables are: {"ic-brand-primary"=>"#008EE2",
"ic-brand-font-color-dark"=>"#2D3B45", "ic-link-color"=>"#008EE2",
"ic-brand-button--primary-bgd"=>"$ic-brand-primary",
"ic-brand-button--primary-text"=>"#ffffff",
"ic-brand-button--secondary-bgd"=>"#2D3B45",
"ic-brand-button--secondary-text"=>"#ffffff",
"ic-brand-global-nav-bgd"=>"#394B58",
"ic-brand-global-nav-ic-icon-svg-fill"=>"#ffffff",
"ic-brand-global-nav-ic-icon-svg-fill--active"=>"$ic-brand-primary",
"ic-brand-global-nav-menu-item__text-color"=>"#ffffff",
"ic-brand-global-nav-menu-item__text-color--active"=>"$ic-link-color",
"ic-brand-global-nav-avatar-border"=>"#ffffff",
"ic-brand-global-nav-menu-item__badge-bgd"=>"$ic-brand-primary",
"ic-brand-global-nav-menu-item__badge-text"=>"#ffffff",
"ic-brand-global-nav-logo-bgd"=>"#394B58",
"ic-brand-header-image"=>"/dist/images/canvas_log...@2x-5b9973a671.png",
"ic-brand-watermark"=>"", "ic-brand-watermark-opacity"=>"1.0",
"ic-brand-favicon"=>"/dist/images/favicon-7b7c85bb00.ico",
"ic-brand-apple-touch-icon"=>"/dist/images/apple-touch-icon-1635c017d8.png",
"ic-brand-msapplication-tile-color"=>"$ic-brand-primary",
"ic-brand-msapplication-tile-square"=>"/dist/images/windows-tile-f2359ad914.png",
"ic-brand-msapplication-tile-wide"=>"/dist/images/windows-tile-wide-52212226d6.png",
"ic-brand-right-sidebar-logo"=>"",
"ic-brand-Login-body-bgd-color"=>"#394B58",
"ic-brand-Login-body-bgd-image"=>"",
"ic-brand-Login-body-bgd-shadow-color"=>"#2D3B45",
"ic-brand-Login-logo"=>"/dist/images/login/canvas-logo-a66b946d8d.svg",
"ic-brand-Login-Content-bgd-color"=>"none",
"ic-brand-Login-Content-border-color"=>"none",
"ic-brand-Login-Content-inner-bgd"=>"none",
"ic-brand-Login-Content-inner-border"=>"none",
"ic-brand-Login-Content-inner-body-bgd"=>"none",
"ic-brand-Login-Content-inner-body-border"=>"none",
"ic-brand-Login-Content-label-text-color"=>"#ffffff",
"ic-brand-Login-Content-password-text-color"=>"#ffffff",
"ic-brand-Login-footer-link-color"=>"#ffffff",
"ic-brand-Login-footer-link-color-hover"=>"#ffffff",
"ic-brand-Login-instructure-logo"=>"#ffffff"}
/var/canvas/lib/brandable_css.rb:133:in `block in
check_if_we_need_to_create_a_db_migration'
/var/canvas/lib/brandable_css.rb:129:in `each'
/var/canvas/lib/brandable_css.rb:129:in
`check_if_we_need_to_create_a_db_migration'
/var/canvas/lib/brandable_css.rb:145:in `default_variables_md5'
/var/canvas/lib/brandable_css.rb:231:in `default_brand_file'
/var/canvas/lib/brandable_css.rb:249:in `save_default!'
/var/canvas/lib/brandable_css.rb:255:in `block (2 levels) in
save_default_files!'
/var/canvas/lib/brandable_css.rb:255:in `each'
/var/canvas/lib/brandable_css.rb:255:in `block in save_default_files!'
/var/canvas/lib/brandable_css.rb:254:in `each'
/var/canvas/lib/brandable_css.rb:254:in `save_default_files!'
/var/canvas/lib/tasks/css.rake:22:in `block (3 levels) in <top (required)>'
/var/canvas/lib/tasks/css.rake:16:in `block (2 levels) in <top (required)>'
/var/canvas/lib/tasks/canvas.rake:40:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.4.0/gems/rake-12.2.1/exe/rake:27:in
`<top (required)>'
Tasks: TOP => css:compile
(See full trace by running task with --trace)

Attentively Norge

DV-RU

unread,
Nov 8, 2019, 10:45:02 AM11/8/19
to Canvas LMS Users
I had gotten same problem. I changed some images and some css before first install. So Im writting here because I will find this in future.
Simply you need to rename all migration files as provided by output:
mv db/migrate/*_regenerate_brand_files_based_on_new_defaults_predeploy.rb \
db/migrate/940701317156510265337_regenerate_brand_files_based_on_new_defaults_predeploy.rb \
&& \
mv db/migrate/*_regenerate_brand_files_based_on_new_defaults_postdeploy.rb \
db/migrate/940701317156510265338_regenerate_brand_files_based_on_new_defaults_postdeploy.rb

Then you can re-run database population.

суббота, 16 декабря 2017 г., 23:08:40 UTC+3 пользователь Norge Dario Concepcion Pupo написал:
"ic-brand-header-image"=>"/dist/images/canvas_logomark_on...@2x-5b9973a671.png",
Reply all
Reply to author
Forward
0 new messages