instructure / canvas-lms

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

Database population:rake aborted! TypeError: can't convert Hash into Float #1671

Open kwchiang456 opened 4 years ago

kwchiang456 commented 4 years ago

Summary:

While Database population, it shows error "rake aborted! TypeError: can't convert Hash into Float" during "** Execute environment"

Steps to reproduce:

  1. At the Database population, run command "RAILS_ENV=production bundle exec rake db:initial_setup --trace"

Expected behavior:

Prompt to create an administrator account

Actual behavior:

No prompt

Additional notes:

canvasadmin@canvasnila:/var/canvas$ RAILS_ENV=production bundle exec rake db:initial_setup --trace
Ruby 2.7+ support is untested
/var/canvas/vendor/bundle/ruby/2.7.0/gems/graphql-1.9.17/lib/graphql/schema/mutation.rb:71: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/var/canvas/vendor/bundle/ruby/2.7.0/gems/graphql-1.9.17/lib/graphql/schema/member/has_fields.rb:11: warning: The called method `field' is defined here
/var/canvas/vendor/bundle/ruby/2.7.0/gems/faraday-0.15.4/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/var/canvas/vendor/bundle/ruby/2.7.0/gems/faraday-0.15.4/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/var/canvas/vendor/bundle/ruby/2.7.0/gems/faraday-0.15.4/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/var/canvas/vendor/bundle/ruby/2.7.0/gems/faraday-0.15.4/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/var/canvas/vendor/bundle/ruby/2.7.0/gems/faraday-0.15.4/lib/faraday/options.rb:166: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/var/canvas/vendor/bundle/ruby/2.7.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_core_support.rb:142: warning: Using the last argument as keyword parameters is deprecated
/var/canvas/vendor/bundle/ruby/2.7.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_core_support.rb:142: warning: Using the last argument as keyword parameters is deprecated
/var/canvas/vendor/bundle/ruby/2.7.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:150: warning: constant ::Fixnum is deprecated
/var/canvas/vendor/bundle/ruby/2.7.0/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:216: warning: constant ::Fixnum is deprecated
** Invoke db:initial_setup (first_time)
** Invoke db:generate_security_key (first_time)
** Execute db:generate_security_key
** Execute db:initial_setup
** Invoke db:migrate:predeploy (first_time)
** Invoke environment (first_time)
** Execute environment
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
rake aborted!
TypeError: can't convert Hash into Float
/var/canvas/vendor/bundle/ruby/2.7.0/gems/shackles-1.4.2/lib/shackles/connection_specification.rb:67:in `%'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/shackles-1.4.2/lib/shackles/connection_specification.rb:67:in `block in config'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/shackles-1.4.2/lib/shackles/connection_specification.rb:65:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/shackles-1.4.2/lib/shackles/connection_specification.rb:65:in `config'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:985:in `establish_connection'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/switchman-1.15.1/lib/switchman/active_record/connection_handler.rb:31:in `establish_connection'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:60:in `establish_connection'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/railtie.rb:132:in `block in <class:Railtie>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.7.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.7.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/railtie.rb:190:in `public_send'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/railtie.rb:190:in `method_missing'
/var/canvas/config/environment.rb:28:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/application.rb:337:in `require_environment!'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.3/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:241:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:241:in `invoke_prerequisites'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/var/canvas/lib/tasks/db_load_data.rake:206:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/var/canvas/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/2.7.0/bin/rake:23:in `load'
/var/canvas/vendor/bundle/ruby/2.7.0/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate:predeploy => environment
canvasadmin@canvasnila:/var/canvas$
argctl commented 4 years ago

Same issue. I'm not ruby dev but need to run this software.