Canvas LMS

Upgrade Canvas LMS

Upgrade Canvas

Reference URL

检查 Redis 服务版本

自 2013-10-05 版本之后,需要升级 Redis 2.6 版本以上,可通过如下命令查看当前 Redis Server 版本:

> redis-server -v

Prepare to Upgrade

  1. Fetch all new updates first:
> su canvas
> git fetch origin
  1. Find out what is the current branch:
> git branch

It will return something like this:

HEAD detached at origin/stable/2022-03-02

> git fetch && git reset --hard origin/prod
  1. 成功拉取 git 更新之后,准备升级和安装依赖库:
> bundle update
> bundle install

bundle 升级过程中,如需删除缓存,可参考该路径:/data/canvas/vendor/bundle/ruby/x.x.x/cache/bundler/ 删除缓存

  1. Add GEM_HOME Path:
nano ~/.basrhc
export GEM_HOME="$HOME/.rbenv/versions/$(rbenv version-name)"

Compiled Assets

RAILS_ENV=production $GEM_HOME/bin/bundle exec rake canvas:compile_assets

Deprecation

DEPRECATION WARNING: redis_store is no longer supported. Please change to redis_cache_store, and change servers to url.

  1. Edit config/cache_store.yml, change cache_store: redis_store to cache_store: redis_cache_store
  2. Edit config/redis.yml, change servers to url

Troubleshooting

NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

Try to install concurrent-ruby:

> rm Gemfile.rails61.lock
> bundle add concurrent-ruby --version 1.3.4
Previous
Maintenance