Error when trying to run forked canvas-lms in GitHub Codespace: TypeError: Post is not a class

erhll01
Community Member

I am attempting to run instructure’s canvas-lms through GitHub codespace and am encountering the following issue. I am using the free 4 core plan. The repository and instructions for the codespace setupcan be found here. Has anyone run into this issue after using bundle exec rails canvas:compile_assets while trying to run their forked canvas-lms in GitHub codespace? I should be able to run bundle exec rails db:initial_setup after doing so to receive a prompt for authentication.

I run the following commands:

sudo apt-get update sudo apt-get -y install postgresql-12 zlib1g-dev libldap2-dev libidn11-dev libxml2-dev libsqlite3-dev libpq-dev libxmlsec1-dev curl build-essential

rvm install "ruby-2.7.0" rvm use 2.7.0 gem install bundle gem install bundler:2.3.26 gem install nokogumbo scrypt sanitize ruby-debug-ide sudo chown -R codespace:codespace /workspaces/canvas-lms/ sudo chown -R codespace:codespace /usr/local/rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0 bundle 2.3.26 install yarn install --pure-lockfile for config in amazon_s3 delayed_jobs domain file_store outgoing_mail security external_migration dynamic_settings database;
do cp -v config/$config.yml.example config/$config.yml; done bundle 2.3.26 update sudo chown -R codespace:codespace /var/run/postgresql/ export PGHOST=localhost /usr/lib/postgresql/12/bin/initdb ~/postgresql-data/ -E utf8 /usr/lib/postgresql/12/bin/pg_ctl -D ~/postgresql-data/ -l ~/postgresql-data/server.log start /usr/lib/postgresql/12/bin/createdb canvas_development bundle exec rails canvas:compile_assets

**At this point the following error is thrown: Top level ::CompositeIO is deprecated, require 'multipart/post' and use Multipart::Post::CompositeReadIO instead! Top level ::Parts is deprecated, require 'multipart/post' and use Multipart::Post::Parts instead! /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:65: warning: constant ::UploadIO is deprecated /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:66: warning: constant ::Parts is deprecated rails aborted! TypeError: Post is not a class

I am attempting to run instructure’s canvas-lms through GitHub codespace and am encountering the following issue. I am using the free 4 core plan. The repository and instructions for the codespace setupcan be found here. Has anyone run into this issue after using bundle exec rails canvas:compile_assets while trying to run their forked canvas-lms in GitHub codespace? I should be able to run bundle exec rails db:initial_setup after doing so to receive a prompt for authentication.

I run the following commands:

sudo apt-get update sudo apt-get -y install postgresql-12 zlib1g-dev libldap2-dev libidn11-dev libxml2-dev libsqlite3-dev libpq-dev libxmlsec1-dev curl build-essential

rvm install "ruby-2.7.0" rvm use 2.7.0 gem install bundle gem install bundler:2.3.26 gem install nokogumbo scrypt sanitize ruby-debug-ide sudo chown -R codespace:codespace /workspaces/canvas-lms/ sudo chown -R codespace:codespace /usr/local/rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0 bundle 2.3.26 install yarn install --pure-lockfile for config in amazon_s3 delayed_jobs domain file_store outgoing_mail security external_migration dynamic_settings database;
do cp -v config/$config.yml.example config/$config.yml; done bundle 2.3.26 update sudo chown -R codespace:codespace /var/run/postgresql/ export PGHOST=localhost /usr/lib/postgresql/12/bin/initdb ~/postgresql-data/ -E utf8 /usr/lib/postgresql/12/bin/pg_ctl -D ~/postgresql-data/ -l ~/postgresql-data/server.log start /usr/lib/postgresql/12/bin/createdb canvas_development bundle exec rails canvas:compile_assets

**At this point the following error is thrown: Top level ::CompositeIO is deprecated, require 'multipart/post' and use Multipart::Post::CompositeReadIO instead! Top level ::Parts is deprecated, require 'multipart/post' and use Multipart::Post::Parts instead! /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:65: warning: constant ::UploadIO is deprecated /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:66: warning: constant ::Parts is deprecated rails aborted! TypeError: Post is not a class

When I run bundle exec rails canvas:

compile_assets –trace, the following is shown: Top level ::CompositeIO is deprecated, require 'multipart/post' and use Multipart::Post::CompositeReadIO instead! Top level ::Parts is deprecated, require 'multipart/post' and use Multipart::Post::Parts instead! /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:65: warning: constant ::UploadIO is deprecated /usr/local/rvm/gems/ruby-2.7.0/gems/faraday-0.17.4/lib/faraday/upload_io.rb:66: warning: constant ::Parts is deprecated rails aborted! TypeError: Post is not a class /usr/local/rvm/gems/ruby-2.7.0/gems/multipart-post-2.3.0/lib/multipart/post/parts.rb:25: previous definition of Post was here /workspaces/canvas-lms/gems/multipart/lib/multipart/post.rb:23:in <module:Multipart>' /workspaces/canvas-lms/gems/multipart/lib/multipart/post.rb:22:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/zeitwerk-2.6.7/lib/zeitwerk/kernel.rb:38:in require' /workspaces/canvas-lms/gems/multipart/lib/multipart.rb:40:in <module:Multipart>' /workspaces/canvas-lms/gems/multipart/lib/multipart.rb:35:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/zeitwerk-2.6.7/lib/zeitwerk/kernel.rb:38:in require' /workspaces/canvas-lms/gems/canvas_kaltura/lib/canvas_kaltura/kaltura_client_v3.rb:26:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/zeitwerk-2.6.7/lib/zeitwerk/kernel.rb:38:in require' /workspaces/canvas-lms/gems/canvas_kaltura/lib/canvas_kaltura.rb:24:in <module:CanvasKaltura>' /workspaces/canvas-lms/gems/canvas_kaltura/lib/canvas_kaltura.rb:23:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/zeitwerk-2.6.7/lib/zeitwerk/kernel.rb:38:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:60:in block (2 levels) in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:55:in each' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:55:in block in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:44:in each' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:44:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bundler-2.3.26/lib/bundler.rb:186:in require' /workspaces/canvas-lms/config/application.rb:28:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /workspaces/canvas-lms/Rakefile:6:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in load' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in load_rakefile' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/application.rb:703:in raw_load_rakefile' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/application.rb:104:in block in load_rakefile' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in standard_exception_handling' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/application.rb:103:in load_rakefile' /usr/local/rvm/gems/ruby-2.7.0/gems/railties-7.0.3/lib/rails/commands/rake/rake_command.rb:20:in block in perform' /usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:59:in with_application' /usr/local/rvm/gems/ruby-2.7.0/gems/railties-7.0.3/lib/rails/commands/rake/rake_command.rb:18:in perform' /usr/local/rvm/gems/ruby-2.7.0/gems/railties-7.0.3/lib/rails/command.rb:51:in invoke' /usr/local/rvm/gems/ruby-2.7.0/gems/railties-7.0.3/lib/rails/commands.rb:18:in <main>' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /usr/local/rvm/gems/ruby-2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /workspaces/canvas-lms/bin/rails:16:in <top (required)>' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/client/rails.rb:30:in load' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/client/rails.rb:30:in call' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/client/command.rb:7:in call' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/client.rb:30:in run' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/bin/spring:49:in <top (required)>' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/binstub.rb:11:in load' /usr/local/rvm/gems/ruby-2.7.0/gems/spring-4.0.0/lib/spring/binstub.rb:11:in <top (required)>' /workspaces/canvas-lms/bin/spring:21:in require' /workspaces/canvas-lms/bin/spring:21:in <top (required)>' bin/rails:5:in load' bin/rails:5:in <main>'

0 Likes