Error on initial setup

525 views
Skip to first unread message

Daniel Rodriguez

unread,
Feb 15, 2018, 1:09:56 AM2/15/18
to Canvas LMS Users
System: macOS 10.13.3, SIP off, latest git. After running RAILS_ENV=production bundle exec rake db:initial_setup, I get this error:

$ RAILS_ENV=production bundle exec rake db:initial_setup

Ruby 2.5 support is untested

/usr/local/canvas-dev/vendor/bundle/ruby/2.5.0/gems/iconv-1.0.4/lib/iconv/version.rb:1: warning: constant ::Data is deprecated

/usr/local/canvas-dev/vendor/bundle/ruby/2.5.0/gems/iconv-1.0.4/lib/iconv.rb:4: warning: constant ::Data is deprecated

/usr/local/canvas-dev/vendor/bundle/ruby/2.5.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:150: warning: constant ::Fixnum is deprecated

/usr/local/canvas-dev/vendor/bundle/ruby/2.5.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:216: warning: constant ::Fixnum is deprecated

rake aborted!

NoMethodError: undefined method `add_ruby_type' for Psych:Module

Did you mean?  add_builtin_type

/usr/local/canvas-dev/config/application.rb:178:in `<class:Application>'

/usr/local/canvas-dev/config/application.rb:39:in `<module:CanvasRails>'

/usr/local/canvas-dev/config/application.rb:38:in `<top (required)>'

/usr/local/canvas-dev/Rakefile:4:in `require'

/usr/local/canvas-dev/Rakefile:4:in `<top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'

/usr/local/bin/bundle:23:in `load'

/usr/local/bin/bundle:23:in `<main>'


This is with latest ruby (2.5.0) and latest bundler, and rubygems.
Any ideas?

Thank you.

Graham Ballantyne

unread,
Feb 15, 2018, 1:39:55 AM2/15/18
to canvas-l...@googlegroups.com
Have you tried with Ruby 2.4? As the output you pasted states, Ruby 2.5 is untested.

– 
Graham Ballantyne 
Senior Software Engineer | IT Services 
Simon Fraser University | Strand Hall 1001 
8888 University Dr., Burnaby, B.C. V5A 1S6 
604-837-6698  | gra...@sfu.ca
--

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

Daniel Rodriguez

unread,
Feb 15, 2018, 1:47:06 AM2/15/18
to Canvas LMS Users
I will try it. It's hard to roll back ruby versions in homebrew, but I figured out a way. Although it makes me wonder why the latest ruby would not be supported. Thanks for that, I didn't catch it. 

Daniel Rodriguez

unread,
Feb 15, 2018, 2:08:26 AM2/15/18
to Canvas LMS Users
Ok, here it is with a freshly compiled ruby 2.4.3. I tried a clean database, no change. I'm at a loss at this one. I legitimately have no clue. I appreciate all the work you guys put into helping us, and thank you again for any advice.

$ RAILS_ENV=production bundle exec rake db:initial_setup

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:150: warning: constant ::Fixnum is deprecated

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:216: warning: constant ::Fixnum is deprecated

1: production:public

==  RemoveForeignKeyFromEnrollmentsToPseudonym: migrating =====================

-- remove_foreign_key_if_exists(:enrollments, {:column=>:sis_pseudonym_id})

rake aborted!

StandardError: An error has occurred, this and all later migrations canceled:


Table 'enrollments' has no foreign key for {:column=>:sis_pseudonym_id}

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:970:in `foreign_key_for!'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:940:in `remove_foreign_key'

/usr/local/canvas-dev/config/initializers/active_record.rb:1255:in `remove_foreign_key_if_exists'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:846:in `block in method_missing'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `block in say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:835:in `method_missing'

/usr/local/canvas-dev/db/migrate/20180123191425_remove_foreign_key_from_enrollments_to_pseudonym.rb:22:in `change'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:789:in `exec_migration'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:772:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:771:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:601:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:951:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `block in ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/transactions.rb:211:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/active_record/base.rb:44:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'

/usr/local/canvas-dev/config/initializers/active_record.rb:1215:in `execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1319:in `with_advisory_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `migrate'

/usr/local/canvas-dev/lib/tasks/canvas.rake:164:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `block (6 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `block (5 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:71:in `block (4 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:372:in `block (2 levels) in with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:584:in `block in activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:86:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:583:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:370:in `block in with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/relation/delegation.rb:38:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/relation/delegation.rb:38:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:366:in `with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:66:in `block (3 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:63:in `block (2 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/shackles.rb:22:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:62:in `block in shardify_task'

/usr/local/canvas-dev/lib/tasks/db_load_data.rake:239:in `block (2 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'

/usr/local/bin/bundle:23:in `load'

/usr/local/bin/bundle:23:in `<main>'


Caused by:

ArgumentError: Table 'enrollments' has no foreign key for {:column=>:sis_pseudonym_id}

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:970:in `foreign_key_for!'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:940:in `remove_foreign_key'

/usr/local/canvas-dev/config/initializers/active_record.rb:1255:in `remove_foreign_key_if_exists'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:846:in `block in method_missing'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `block in say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:835:in `method_missing'

/usr/local/canvas-dev/db/migrate/20180123191425_remove_foreign_key_from_enrollments_to_pseudonym.rb:22:in `change'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:789:in `exec_migration'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:772:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:771:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:601:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:951:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `block in ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/transactions.rb:211:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/active_record/base.rb:44:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'

/usr/local/canvas-dev/config/initializers/active_record.rb:1215:in `execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1319:in `with_advisory_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `migrate'

/usr/local/canvas-dev/lib/tasks/canvas.rake:164:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `block (6 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:72:in `block (5 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:71:in `block (4 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:372:in `block (2 levels) in with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:584:in `block in activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:86:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:583:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:370:in `block in with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/relation/delegation.rb:38:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/relation/delegation.rb:38:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/app/models/switchman/shard_internal.rb:366:in `with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:66:in `block (3 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:63:in `block (2 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/switchman/shackles.rb:22:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.4/lib/tasks/switchman.rake:62:in `block in shardify_task'

/usr/local/canvas-dev/lib/tasks/db_load_data.rake:239:in `block (2 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'

/usr/local/bin/bundle:23:in `load'

/usr/local/bin/bundle:23:in `<main>'

Tasks: TOP => db:migrate:predeploy

Cody Cutrer

unread,
Feb 15, 2018, 3:39:03 PM2/15/18
to canvas-l...@googlegroups.com
Daniel,

Which version (specific hash would be helpful) of Canvas are you using? Looking at https://github.com/instructure/canvas-lms/blob/stable/config/initializers/active_record.rb#L1255, line 1255 on the current stable branch is not part of remove_foreign_key_if_exists as implied by your stack trace, so you're not on the current stable version (nor on current master). I know there have been some recent changes in that method (https://github.com/instructure/canvas-lms/commit/936d0fb) that hopefully already fixes your problem.

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-users+unsubscribe@googlegroups.com.

Daniel Rodriguez

unread,
Feb 15, 2018, 6:10:06 PM2/15/18
to Canvas LMS Users
Thank you very much for the info. I had been running git clone https://github.com/instructure/canvas-lms.git  and it appears that I am on stable by running git branch. I will run git clone -b master to test it out. Thank you again.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.

Daniel Rodriguez

unread,
Feb 15, 2018, 7:06:19 PM2/15/18
to Canvas LMS Users
Ok. I cloned master, and I verified that I have the latest commit:

$ git log --abbrev-commit

commit bb93de3ff2 (HEAD -> master, origin/master)

Author: Clay Diffrient <cdiff...@instructure.com>

Date:   Wed Feb 14 17:07:20 2018 -0700


    Add feature flag to hide refactor work to theme editor

    

    closes CORE-1010

    

    Test Plan:

      - A feature flag for "Theme Editor Refactor" is visible

        in development environments

    

    Change-Id: I18d00b257ec632f9d496a480ade624bb564ef538

    Reviewed-on: https://gerrit.instructure.com/141030

    Reviewed-by: Rob Orton <r...@instructure.com>

    Tested-by: Jenkins

    Product-Review: Robert Lamb <rl...@instructure.com>

    QA-Review: Robert Lamb <rl...@instructure.com>


I get the same problem: (this is with a brand new, empty database created with createdb canvas_production_test --owner=canvas

-- remove_foreign_key_if_exists(:enrollments, {:column=>:sis_pseudonym_id})

rake aborted!

StandardError: An error has occurred, this and all later migrations canceled:


Table 'enrollments' has no foreign key for {:column=>:sis_pseudonym_id}

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:970:in `foreign_key_for!'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:940:in `remove_foreign_key'

/usr/local/canvas-dev/config/initializers/active_record.rb:1255:in `remove_foreign_key_if_exists'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:846:in `block in method_missing'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `block in say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:815:in `say_with_time'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:835:in `method_missing'

/usr/local/canvas-dev/db/migrate/20180123191425_remove_foreign_key_from_enrollments_to_pseudonym.rb:22:in `change'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:789:in `exec_migration'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:772:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:771:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:601:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:951:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `block in ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/transactions.rb:211:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/active_record/base.rb:44:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'

/usr/local/canvas-dev/config/initializers/active_record.rb:1215:in `execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1319:in `with_advisory_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `migrate'

/usr/local/canvas-dev/lib/tasks/canvas.rake:164:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `block (6 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `block (5 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:71:in `block (4 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/app/models/switchman/shard_internal.rb:162:in `with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:66:in `block (3 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:63:in `block (2 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/shackles.rb:22:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:62:in `block in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/connection_pool_proxy.rb:13:in `with_connection'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:771:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:601:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:951:in `migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `block in ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/transactions.rb:211:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/active_record/base.rb:44:in `transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1300:in `ddl_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction'

/usr/local/canvas-dev/config/initializers/active_record.rb:1215:in `execute_migration_in_transaction'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1203:in `block in migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1202:in `migrate_without_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `block in migrate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1319:in `with_advisory_lock'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.4/lib/active_record/migration.rb:1150:in `migrate'

/usr/local/canvas-dev/lib/tasks/canvas.rake:164:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `block (6 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:72:in `block (5 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:71:in `block (4 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/app/models/switchman/shard_internal.rb:162:in `with_each_shard'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:66:in `block (3 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/database_server.rb:99:in `unshackle'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:63:in `block (2 levels) in shardify_task'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/switchman/shackles.rb:22:in `activate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/switchman-1.11.5/lib/tasks/switchman.rake:62:in `block in shardify_task'

/usr/local/canvas-dev/lib/tasks/db_load_data.rake:239:in `block (2 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'

/usr/local/bin/bundle:23:in `load'

/usr/local/bin/bundle:23:in `<main>'

Tasks: TOP => db:migrate:predeploy


On Thursday, February 15, 2018 at 3:39:03 PM UTC-5, Cody Cutrer wrote:

Bin Corleone

unread,
Feb 16, 2018, 3:23:27 AM2/16/18
to Canvas LMS Users
Are you using MySQL instead of PostgreSQL? 

In addition, you said you have done a new install with a new database. You emptied the database or have you created a new one from scratch? 

Daniel Rodriguez

unread,
Feb 17, 2018, 12:38:17 AM2/17/18
to Canvas LMS Users
I am using PostgreSQL v10.2. I have created a new database from scratch for the purpose of attempting canvas installation, by running createdb canvas_production_test --owner=canvas and using my existing canvas user to login to Postgres at localhost:5000. 

$ psql --version

psql (PostgreSQL) 10.2

$ postgres --version

postgres (PostgreSQL) 10.2

$ sudo launchctl list | grep postgres

85 0 homebrew.mxcl.postgresql

$ sudo launchctl list | grep canvas

48 0 canvas.nginx

$ cat /usr/local/canvas-dev/config/database.yml
... [cut for brevity]

production:

  adapter: postgresql

  encoding: utf8

  database: canvas_production_master

  host: localhost

  username: canvas

  password: canvas

  timeout: 5000

More server info: 

$ uname -a

Darwin Daniels-Mac-Pro.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

$ sw_vers

ProductName: Mac OS X

ProductVersion: 10.13.2

BuildVersion: 17C88

Daniel Rodriguez

unread,
Feb 17, 2018, 12:41:54 AM2/17/18
to Canvas LMS Users
Sorry, the port used for PostgreSQL in my case is actually 5432, so I am connecting to localhost:5432 or 127.0.0.1:5432. The 5000 value I posted by mistake is the timeout value. Canvas is connecting to PostgreSQL, just not sure what the issue is with the foreign keys
Thanks again,
Daniel

Bin Corleone

unread,
Feb 17, 2018, 12:46:08 AM2/17/18
to Canvas LMS Users
Would you please use PostgreSQL 9.5? Canvas is famous for throwing out errors when playing around with dependencies versions. 

Bin Corleone

unread,
Feb 17, 2018, 12:53:03 AM2/17/18
to Canvas LMS Users
Ok just to make sure once again. It is obvious you are trying to run canvas on the latest version of dependencies. It doesn't work this way, stick around the versions they use now.

Make sure the of following: 

1. Ruby 2.4.x
2. Bundler 1.13.16
3. PostgreSQL 9.5
4. Redis 2.6.x or above
5. Apache 2.4 (it works with 2.2 but you need more work)

Daniel Rodriguez

unread,
Feb 17, 2018, 1:14:21 AM2/17/18
to Canvas LMS Users
1. $ ruby --version

ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin17]

2. bundler --version

Bundler version 1.13.6

3. $ postgres --version

postgres (PostgreSQL) 10.2 #!! Will try downgrading to 9.5 with homebrew

4. $ redis-server --version

Redis server v=4.0.8 sha=00000000:0 malloc=libc bits=64 build=d791831611c260ce

5. $ nginx -v

nginx version: nginx/1.13.8

I will try downgrading Postgres. Thankfully I don't have any important databases, and I did have canvas running a long while back, and I recall upgrading Postgres to the 10.x line from the 9.x line. Thanks for the advice. I will report back with any changes. Again, thank you for all the help you have provided. 

-Daniel

Daniel Rodriguez

unread,
Feb 17, 2018, 2:00:19 AM2/17/18
to Canvas LMS Users
It appears that for whatever reason, compiling assets errors out now? (before I even do initial setup) I am running this command as per the production guide, after running bundle install --path vendor/bundle and yarn install:

$ RAILS_ENV=production bundle exec rake canvas:compile_assets

[successful compile before this, truncated for brevity]

[zdgz0nIWsp] ./app/jsx/bundles/course_statistics.js 1.81 kB {108} [built]

    + 5492 hidden modules

Done in 693.33s.

--> Finished: 'js:webpack_production' in 693.7754750000022

--> Finished: 'run i18n:generate_js, js:webpack_development, js:webpack_production' in 792.1656649999932

rake aborted!

Parallel::UndumpableException: NoMethodError: undefined method `requirements' for nil:NilClass

Did you mean?  require_dependency

/usr/local/canvas-dev/doc/api/method_details/html/setup.rb:38:in `get_routes'

/usr/local/canvas-dev/doc/api/method_details/html/setup.rb:19:in `init'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:185:in `initialize'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:130:in `new'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:135:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:360:in `render_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:251:in `block (2 levels) in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `block in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:392:in `add_options'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:247:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:269:in `block in yieldall'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:400:in `with_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:269:in `yieldall'

/usr/local/canvas-dev/doc/api/topic/html/method_details_list.erb:5:in `block in _erb_cache_6'

/usr/local/canvas-dev/doc/api/topic/html/method_details_list.erb:4:in `each'

/usr/local/canvas-dev/doc/api/topic/html/method_details_list.erb:4:in `each_with_index'

/usr/local/canvas-dev/doc/api/topic/html/method_details_list.erb:4:in `_erb_cache_6'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:279:in `erb'

/usr/local/canvas-dev/doc/api/topic/html/setup.rb:33:in `method_details_list'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:355:in `render_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:251:in `block (2 levels) in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `block in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:386:in `add_options'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:247:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:135:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:360:in `render_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:251:in `block (2 levels) in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `block in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:386:in `add_options'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:247:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:269:in `block in yieldall'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:400:in `with_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:269:in `yieldall'

/usr/local/canvas-dev/doc/api/layout/html/layout.erb:18:in `_erb_cache_0'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:279:in `erb'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:357:in `render_section'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:251:in `block (2 levels) in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:248:in `block in run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:386:in `add_options'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:247:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:135:in `run'

/usr/local/canvas-dev/doc/api/fulldoc/html/setup.rb:172:in `block in init'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/engine.rb:122:in `block in with_serializer'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/logging.rb:70:in `capture'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/engine.rb:120:in `with_serializer'

/usr/local/canvas-dev/doc/api/fulldoc/html/setup.rb:171:in `init'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:185:in `initialize'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:130:in `new'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/template.rb:135:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/templates/engine.rb:104:in `generate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/cli/yardoc.rb:346:in `run_generate'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/cli/yardoc.rb:260:in `run'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/yard-0.9.5/lib/yard/rake/yardoc_task.rb:74:in `block in define'

/usr/local/canvas-dev/lib/tasks/canvas.rake:83:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/lib/tasks/canvas.rake:90:in `block (5 levels) in <top (required)>'

/usr/local/canvas-dev/lib/tasks/canvas.rake:7:in `log_time'

/usr/local/canvas-dev/lib/tasks/canvas.rake:90:in `block (4 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:484:in `call_with_index'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:455:in `process_incoming_jobs'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:437:in `block in worker'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:428:in `fork'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:428:in `worker'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:419:in `block in create_workers'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `each'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `each_with_index'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `create_workers'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:358:in `work_in_processes'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/parallel-1.12.1/lib/parallel.rb:264:in `map'

/usr/local/canvas-dev/lib/tasks/canvas.rake:89:in `block (3 levels) in <top (required)>'

/usr/local/canvas-dev/lib/tasks/canvas.rake:88:in `block (2 levels) in <top (required)>'

/usr/local/canvas-dev/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:30:in `block in <top (required)>'

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'

/usr/local/bin/bundle:23:in `load'

/usr/local/bin/bundle:23:in `<main>'

Tasks: TOP => canvas:compile_assets


I feel like this is something obvious that I am not getting. I had a working canvas install before, but I since removed that install a year ago, and just recently came back to using it. I have always used nginx + passenger and it worked fine.
Regards,
Daniel

Bin Corleone

unread,
Feb 17, 2018, 4:08:41 AM2/17/18
to Canvas LMS Users
No problem Daniel!

I don't really understand why it is throwing that error, maybe because the environment path. Execute the compiling command inside of Canvas directory.

These the commands I use to compile the assets: 

 

 

canvasuser@Canvas:~# cd /var/canvas

canvasuser@Canvas:/var/canvas$ mkdir -p log tmp/pids public/assets app/stylesheets/brandable_css_brands

canvasuser@Canvas:/var/canvas$ touch app/stylesheets/_brandable_variables_defaults_autogenerated.scss

canvasuser@Canvas:/var/canvas$ touch Gemfile.lock

canvasuser@Canvas:/var/canvas$ sudo chown -R canvasuser   config/environment.rb log tmp public/assets app/stylesheets/_brandable_variables_defaults_autogenerated.scss app/stylesheets/brandable_css_brands Gemfile.lock config.ru

 

 

 

Then will need to run:

 

 

canvasuser@Canvas:/var/canvas$ yarn install

canvasuser@Canvas:/var/canvas$ RAILS_ENV=production bundle exec rake canvas:compile_assets

canvasuser@Canvas:/var/canvas$ sudo chown -R canvasuser   public/dist/brandable_css

 

Bin Corleone

unread,
Feb 17, 2018, 4:12:41 AM2/17/18
to Canvas LMS Users
By the way, i'm suspecting that you don't have Python installed or configured correctly. Canvas needs that, could you confirm?

Bin Corleone

unread,
Feb 17, 2018, 6:06:42 AM2/17/18
to Canvas LMS Users
In regard to the foreign key error, this is from Canvas LMS troubleshooting page: 

Multiple failing specs due to ForeignKeyViolation but work in isolation

Errors of this sort:

ActiveRecord::InvalidForeignKey:
        PG::ForeignKeyViolation: ERROR:  insert or update on table "enrollment_terms" violates foreign key constraint "fk_rails_e182f18b93"
        DETAIL:  Key (root_account_id)=(1) is not present in table "accounts"

Delete the test cache_store keys from config/cache_store.yml. It is no longer needed.

Daniel Rodriguez

unread,
Feb 17, 2018, 7:45:28 PM2/17/18
to Canvas LMS Users
I am going to follow all the suggestions you have given me carefully. As for python, I am using the default macOS python, which is as follows:

root# python --version

Python 2.7.10

canvas$ python --version

Python 2.7.10

I also have python3 available from homebrew, which I can access as python3.

root# python3 --version

Python 3.6.4

If needed, I can have python3 be callable as just python, by a quick edit of $PATH. I will try everything you all have suggested.

Hope to get this working.

-Daniel

Bin Corleone

unread,
Feb 22, 2018, 10:43:20 AM2/22/18
to Canvas LMS Users
Daniel, we haven't heard back from you. Is your problem solved?
Reply all
Reply to author
Forward
0 new messages