instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.45k stars 2.44k forks source link

(I18n::ArgumentError) when I try to setup the database. #2061

Open abdellani opened 2 years ago

abdellani commented 2 years ago

Summary:

When I try to create the database, the process crashes with "I18n::ArgumentError" exception.

Steps to reproduce:

  1. clone the project
  2. run bundle
  3. run rails db:create

Expected behavior:

rails db:create should run without issues

Actual behavior:

rails db:create
Ruby 3.0+ support is experimental
Ruby 3.0+ support is experimental
Ruby 3.0+ support is experimental
/home/work/.rvm/gems/ruby-3.0.2/gems/i18n-1.8.5/lib/i18n/backend/transliterator.rb:25:in `get': Transliteration rule must be a proc or a hash. (I18n::ArgumentError)
        from /home/work/.rvm/gems/ruby-3.0.2/gems/i18n-1.8.5/lib/i18n/backend/transliterator.rb:13:in `transliterate'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/i18n-1.8.5/lib/i18n.rb:289:in `transliterate'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/call_helpers.rb:59:in `keyify_underscored'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/call_helpers.rb:68:in `keyify_underscored_crc32'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/call_helpers.rb:74:in `keyify'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/call_helpers.rb:55:in `infer_key'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/call_helpers.rb:123:in `infer_arguments'
        from /home/work/.rvm/gems/ruby-3.0.2/bundler/gems/i18nliner-f29fe018d229/lib/i18nliner/extensions/model.rb:13:in `translate'
        from /home/work/projects/canvas-lms/app/models/outcome_proficiency.rb:34:in `<class:OutcomeProficiency>'
        from /home/work/projects/canvas-lms/app/models/outcome_proficiency.rb:21:in `<top (required)>'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:274:in `const_get'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:274:in `constantize'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `block in observe'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `collect!'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `observe'
        from /home/work/projects/canvas-lms/app/observers/live_events_observer.rb:21:in `<class:LiveEventsObserver>'
        from /home/work/projects/canvas-lms/app/observers/live_events_observer.rb:20:in `<top (required)>'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:274:in `const_get'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:274:in `constantize'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:183:in `instantiate_observer'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `block in instantiate_observers'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `instantiate_observers'
        from /home/work/projects/canvas-lms/config/initializers/observers.rb:21:in `block in <top (required)>'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:427:in `instance_exec'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:427:in `block in make_lambda'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:603:in `catch'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:603:in `block in default_terminator'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:199:in `block in halting'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:512:in `block in invoke_before'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:512:in `each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:512:in `invoke_before'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/callbacks.rb:105:in `run_callbacks'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/reloader.rb:88:in `prepare!'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:32:in `instance_exec'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:32:in `run'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `tsort_each_child'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `call'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `tsort_each_child'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `call'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:50:in `tsort_each_child'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `call'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `call'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/initializable.rb:60:in `run_initializers'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/application.rb:391:in `initialize!'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/railtie.rb:207:in `public_send'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/railties-6.1.4.6/lib/rails/railtie.rb:207:in `method_missing'
        from /home/work/projects/canvas-lms/config/environment.rb:29:in `<top (required)>'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `block in require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in `load_dependency'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `require'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application.rb:108:in `preload'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application.rb:162:in `serve'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application.rb:144:in `block in run'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application.rb:138:in `loop'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application.rb:138:in `run'
        from /home/work/.rvm/gems/ruby-3.0.2/gems/spring-4.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
        from <internal:/usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from -e:1:in `<main>'

Additional notes:

#ruby --version
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
#rails --version
Ruby 3.0+ support is experimental
Ruby 3.0+ support is experimental
Rails 6.1.4.6
sijpkes commented 1 year ago

Did you resolve this one? I'm having a similar issue in the setup script.