instructure / analytics Goto Github PK
View Code? Open in Web Editor NEWThe official analytics package for Instructure's Canvas LMS.
License: GNU Affero General Public License v3.0
The official analytics package for Instructure's Canvas LMS.
License: GNU Affero General Public License v3.0
The master
branch contains a commit (98da440) to add a version
property to package.json so that it can be used with yarn workspaces in Canvas. This commit is missing from the stable
branch, so Canvas installations that pull from stable
instead of master
can't build.
Steps to reproduce:
Expected behaviour
Actual behaviour
yarn
will throw a warning and not install the analytics gem's dependencies: warning Missing version in workspace at "/path/to/canvas/gems/plugins/analytics", ignoring.
. Later on, the webpack build will fail because of missing dependencies in analytics:ERROR in ./gems/plugins/analytics/app/coffeescripts/graphs/base.coffee
Module not found: Error: Can't resolve 'graphael' in '/path/to/canvas/gems/plugins/analytics/app/coffeescripts/graphs'
@ ./gems/plugins/analytics/app/coffeescripts/graphs/base.coffee 1:0-207:2
@ ./gems/plugins/analytics/app/coffeescripts/graphs/grades.coffee
@ ./gems/plugins/analytics/app/coffeescripts/Course/CourseView.coffee
@ ./gems/plugins/analytics/app/coffeescripts/bundles/course.coffee
1
I tried to install Canvas-LMS, but when installing yarn v1.10.1, I got this error:
[5/5] Building fresh packages ...
[1/15] ? node-sass
[6/15] ? uglifyjs-webpack-plugin
[7/15] ? spawn-sync
[8/15] ? fetch-mock
error / home / canvas / canvas-lms / node_modules / @ sentry / cli: Command failed.
Exit code: 1
Command: node scripts / install.js
Arguments:
Directory: / home / canvas / canvas-lms / node_modules / @ sentry / cli
Output:
I do not understand what the problem is. Please help with this, I could not understand and it has been several days.
when I run RAILS_ENV=production bundle exec rake db:migrate
rake aborted!
NameError: uninitialized constant Analytics::Engine::AccountServices
/var/canvas/gems/plugins/analytics/lib/analytics/engine.rb:37:in <class:Engine>' /var/canvas/gems/plugins/analytics/lib/analytics/engine.rb:20:in
module:Analytics'
/var/canvas/gems/plugins/analytics/lib/analytics/engine.rb:19:in <top (required)>' /var/canvas/vendor/bundle/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/canvas/gems/plugins/analytics/lib/analytics.rb:19:in
<top (required)>'
/var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:in require' /var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:in
block (2 levels) in require'
/var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:in each' /var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:in
block in require'
/var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in each' /var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in
require'
/var/lib/gems/2.1.0/gems/bundler-1.7.11/lib/bundler.rb:134:in require' /var/canvas/config/application.rb:13:in
<top (required)>'
/var/canvas/Rakefile:4:in `require'
Using Analytics and Canvas release of March 2014.
Hi folks,
The stable
branch has lagged behind master
and can't be built against the 2022-03-30 release. Building against current master
works. Can we get stable
updated, please?
Thanks!
hi I have this issue wiht latest version of canvas ruby 2.4.0 and bundler (1.13.6)
I try to find it https://rubygems.org/gems - but can not find it,
Bundler could not find compatible versions for gem "autoextend":
In Gemfile:
analytics was resolved to 1.0.0, which depends on
autoextend (~> 1.0.0)
Could not find gem 'autoextend (~> 1.0.0)', which is required by gem
'analytics', in any of the sources.
Cassandra 3.11x
Latest git Analytics
/accounts/self/analytics - is ok.
What to check or change or setup?
ERROR in ./gems/plugins/analytics/app/jsx/StudentInCourse/StudentInCourseView.js Module not found: Error: Can't resolve '@canvas/avatar/jst/_avatar.handlebars' in '/opt/canvas/gems/plugins/analytics/app/jsx/StudentInCourse' @ ./gems/plugins/analytics/app/jsx/StudentInCourse/StudentInCourseView.js 6:0-66 219:34-47 @ ./gems/plugins/analytics/app/jsx/bundles/student_in_course.js @ ./node_modules/bundles-generated.js @ ./app/jsx/main.js
This repository only has a master branch. Currently, analytics master is not building with canvas-lms stable (see #2).
The convention for the canvas-lms repo is that master is bleeding edge, while stable is⦠stable. If analytics is going to remain in a separate repository, this convention should be followed here as well and a stable branch should be created. The current analytics stable branch should always work with the current canvas-lms stable branch.
Tags would be nice to have (e.g. the 2015-01-31 analytics tag should always work with the 2015-01-31 canvas-lms tags), as long as tags in this repo don't have the same problems as tags in the canvas-lms repo (they don't point at the treesame commits, so you can't actually merge them into a fork without incurring massive git conflicts in files that have never been changed in the fork).
When I click on the student, the student context tray generates this error:
POST https://lms.classon.edu.vn/api/graphql 500 (Internal Server Error)
react-dom.production.min.js:209 TypeError: Cannot destructure property 'course' of 't' as it is undefined.
at GraphQLStudentContextTray.js:116:16
at s (react-components.esm.js:9:33)
at fo (react-dom.production.min.js:153:146)
at es (react-dom.production.min.js:175:309)
at $c (react-dom.production.min.js:263:406)
at Bc (react-dom.production.min.js:246:265)
at Ic (react-dom.production.min.js:246:194)
at Tc (react-dom.production.min.js:239:172)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
Observable.js:65 Uncaught TypeError: Cannot destructure property 'course' of 't' as it is undefined.
at GraphQLStudentContextTray.js:116:16
at s (react-components.esm.js:9:33)
at fo (react-dom.production.min.js:153:146)
at es (react-dom.production.min.js:175:309)
at $c (react-dom.production.min.js:263:406)
at Bc (react-dom.production.min.js:246:265)
at Ic (react-dom.production.min.js:246:194)
at Tc (react-dom.production.min.js:239:172)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
The picture below shows the errors I have met:
Please help. Thank you in advance.
It's possible to deploy a DynamoDB instance on AWS and configure Analytics to use it?
I get error while running bundle update
Gem::InstallError: prawn requires Ruby version ~> 2.5. An error occurred while installing prawn (2.3.0), and Bundler cannot continue. Make sure that
gem install prawn -v '2.3.0' succeeds before bundling.
Can not resolve it.
Gemfile.lock editing does not help.
Where to edit this dependency it to overcome?
Which version of Analytics is compatible with canvas version "origin/stable/2017-04-01" ?
Hi all,
After installing the analytics module and restarting canvas_init
I got the following error:
Message from application: undefined method `register' for Analytics::Permissions:Module (NoMethodError)
/var/canvas/gems/plugins/analytics/lib/analytics/engine.rb:44:in `block in <class:Engine>'
/var/canvas/gems/autoextend/lib/autoextend.rb:8:in `extend'
/var/canvas/gems/autoextend/lib/autoextend.rb:37:in `block in const_added'
/var/canvas/gems/autoextend/lib/autoextend.rb:33:in `each'
/var/canvas/gems/autoextend/lib/autoextend.rb:33:in `const_added'
/var/canvas/gems/autoextend/lib/autoextend.rb:118:in `notify_autoextend_of_new_constant'
/var/canvas/gems/autoextend/lib/autoextend.rb:131:in `block in new_constants_in'
/var/canvas/gems/autoextend/lib/autoextend.rb:128:in `each'
/var/canvas/gems/autoextend/lib/autoextend.rb:128:in `new_constants_in'
/var/canvas/gems/autoextend/lib/autoextend.rb:145:in `require_or_load'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in `const_missing'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in `const_missing'
/var/canvas/app/models/role_override.rb:69:in `<class:RoleOverride>'
/var/canvas/app/models/role_override.rb:19:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:360:in `require_or_load'
/var/canvas/gems/autoextend/lib/autoextend.rb:145:in `block in require_or_load'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:647:in `new_constants_in'
/var/canvas/gems/autoextend/lib/autoextend.rb:128:in `new_constants_in'
/var/canvas/gems/autoextend/lib/autoextend.rb:145:in `require_or_load'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:317:in `depend_on'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:233:in `require_dependency'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `each'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `block in eager_load!'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `each'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `eager_load!'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:346:in `eager_load!'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `each'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/var/canvas/config/environment.rb:11:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
/var/canvas/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
My guess is that it's confusing /var/canvas/gems/plugins/analytics/lib/analytics/permissions.rb
with /var/canvas/lib/permissions.rb
from canvas-lms
.
Using stable branches both in canvas-lms
and analytics
.
Thanks in advance,
Xavi
Hello,
I'm trying to install and enable the analytics plugin for Canvas and I've run into an issue. I followed the steps from the documentation and already enabled Cassandra backed pageviews, downloaded the plugin to gems/plugins/analytics and installed the dependencies (bundle update). Our Canvas instance was updated yesterday to the latest version on the stable branch.
The following is an excerpt from the terminal window where the migrations were attempted.
[ ... ]
Using yard 0.9.24
Using yard-appendix 0.1.8
Bundle updated!
Gems in the groups sqlite and mysql were not installed.
root@ip-172-31-21-71:/var/www/canvas# RAILS_ENV=production bundle exec rake db:migrate
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:150: warning: constant ::Fixnum is deprecated
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:216: warning: constant ::Fixnum is deprecated
1: production:public
== PageViewsRollups: migrating ===============================================
-- create_table(:page_views_rollups, {:id=>:bigserial})
-> 0.0118s
-- add_index(:page_views_rollups, [:course_id, :date, :category])
-> 0.0061s
-- add_index(:page_views_rollups, [:course_id])
-> 0.0048s
-- add_foreign_key(:page_views_rollups, :courses, {:column=>:course_id})
-> 0.0026s
== PageViewsRollups: migrated (0.0257s) ======================================
== CachedGradeDistributions: migrating =======================================
-- create_table(:cached_grade_distributions, {:id=>false})
-> 0.0532s
-- add_foreign_key(:cached_grade_distributions, :courses)
-> 0.0023s
== CachedGradeDistributions: migrated (0.0558s) ==============================
== CacheGradeDistributions: migrating ========================================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `delay_if_production' for Analytics::GradeDistributionCacher:Module
/var/www/canvas/gems/plugins/analytics/db/migrate/20120518214904_cache_grade_distributions.rb:7:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:777:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:817:in `exec_migration'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:797:in `block in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:796:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/active_record/migration.rb:16:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:608:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:977:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:212:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/active_record/base.rb:49:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1343:in `ddl_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/var/www/canvas/config/initializers/active_record.rb:1462:in `execute_migration_in_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1262:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1210:in `block in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1210:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1036:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1011:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `block (6 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `block (5 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/database_server.rb:107:in `unguard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:86:in `block (4 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:376:in `block (2 levels) in with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:628:in `block in activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:96:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:627:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:374:in `block in with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:370:in `with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:71:in `block (3 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/database_server.rb:107:in `unguard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:68:in `block (2 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/guard_rail.rb:22:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/guard_rail.rb:8:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:67:in `block in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Caused by:
NoMethodError: undefined method `delay_if_production' for Analytics::GradeDistributionCacher:Module
/var/www/canvas/gems/plugins/analytics/db/migrate/20120518214904_cache_grade_distributions.rb:7:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:777:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:817:in `exec_migration'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:797:in `block in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:796:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/active_record/migration.rb:16:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:608:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:977:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:212:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/active_record/base.rb:49:in `transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1343:in `ddl_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/var/www/canvas/config/initializers/active_record.rb:1462:in `execute_migration_in_transaction'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1262:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1210:in `block in migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1210:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1036:in `up'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:1011:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `block (6 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:87:in `block (5 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/database_server.rb:107:in `unguard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:86:in `block (4 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:376:in `block (2 levels) in with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:628:in `block in activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:96:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:627:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:374:in `block in with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/app/models/switchman/shard.rb:370:in `with_each_shard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:71:in `block (3 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/database_server.rb:107:in `unguard'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:68:in `block (2 levels) in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/switchman/guard_rail.rb:22:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/guard_rail.rb:8:in `activate'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.0/lib/tasks/switchman.rake:67:in `block in shardify_task'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
root@ip-172-31-21-71:/var/www/canvas#
Does anyone understand what the issue is, and how to successfully complete the migrations? Any feedback is appreciated.
Hi devs,
I check out latest stable Analytics plugin and on db:migrate
I got:
/var/canvas: RAILS_ENV=production rake db:migrate --trace
/var/canvas/vendor/bundle/ruby/1.9.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require': iconv will be deprecated in the future, use String#encode instead.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
NameError: uninitialized constant Analytics::Engine::AccountServices
/var/canvas/gems/plugins/analytics/lib/analytics/engine.rb:23:in `block in <class:Engine>'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/initializable.rb:30:in `instance_exec'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/initializable.rb:30:in `run'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/initializable.rb:54:in `each'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/initializable.rb:54:in `run_initializers'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/application.rb:136:in `initialize!'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/canvas/config/environment.rb:23:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/application.rb:103:in `require_environment!'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-b344986bc3d9/railties/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/var/lib/gems/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/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/var/lib/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate => environment
Running cassandra
and its migrations went fine.
I'm running stable Canvas from April 2015.
Any help will be greately appreciated.
== MakeWikiPageContextNotNull: migrating =====================================
-- change_column_null(:wiki_pages, :context_type, false)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::NotNullViolation: ERROR: column "context_type" contains null values
: ALTER TABLE "wiki_pages" ALTER "context_type" SET NOT NULL
I'm trying to perform an in-place update of canvas and I'm running into a problem where the context_type field for every row in the wiki_pages table is null, which causes the data migration to fail.
I can see that there is a class /lib/data_fixup/populate_context_on_wiki_pages.rb
that should populate context_id and context_type, but it isn't quite obvious to me how to determine and manually correct values context_id and context_type on the wiki_pages table.
The current instructure/analytics master branch (083564c) does not build in the current canvas-lms stable branch (a95b729ac6a4ec112a8916abca50129aaf54f455). bundle exec rake canvas:compile_assets
fails with the following:
Client app 'canvas_quizzes' was built successfully.
--> Compiling React JSX
--> Generating plugin extensions
--> Creating ember app bundles
--> Pre-compiling handlebars templates
--> Generating plugin extensions finished in 0.091147258
--> Pre-compiling ember handlebars templates
--> Creating ember app bundles finished in 0.30907965
--> Compiling CoffeeScript with 'coffee' binary
--> Compiling React JSX finished in 3.039696248
--> Pre-compiling ember handlebars templates finished in 4.927348386
--> Pre-compiling handlebars templates finished in 13.946898127
--> Compiling CoffeeScript finished in 21.625334521
--> Finished: 'js:generate' in 84.240054375
--> Starting: 'i18n:generate_js'
..............................................................................................
........................................................F.....................................
................................................................................................
1)
key as scope on line 39: "student_921b864d"
public/javascripts/plugins/analytics/compiled/graphs/responsiveness.js
Finished in 10.765 seconds
2173 files, 4339 strings, 1 failures
Error extracting JS translations; confirm that `./gems/canvas_i18nliner/bin/i18nliner generate_js` works
rake aborted!
Undumpable Exception -- #<SystemExit: exit>
/tmp/canvas-lms/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:173:in `work_in_processes'
/tmp/canvas-lms/vendor/bundle/ruby/1.9.1/gems/parallel-0.5.16/lib/parallel.rb:55:in `map'
/tmp/canvas-lms/lib/tasks/canvas.rake:167:in `block (3 levels) in <top (required)>'
/tmp/canvas-lms/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)
Apparently, this is due to the last commit on analytics (083564c), which only works with canvas-lms master (possibly commit 424da0643c4b244824c0303ddf1eb1c27ea5e0a5).
The "fix" is apparently to check out analytics one commit behind.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.