Canvas LMS
Upgrade Canvas LMS
Upgrade Canvas
Reference URL
检查 Redis 服务版本
自 2013-10-05 版本之后,需要升级 Redis 2.6 版本以上,可通过如下命令查看当前 Redis Server 版本:
> redis-server -v
Prepare to Upgrade
- Fetch all new updates first:
> su canvas
> git fetch origin
- 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
- 成功拉取 git 更新之后,准备升级和安装依赖库:
> bundle update
> bundle install
bundle 升级过程中,如需删除缓存,可参考该路径:/data/canvas/vendor/bundle/ruby/x.x.x/cache/bundler/ 删除缓存
- 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 toredis_cache_store
, and changeservers
tourl
.
- Edit
config/cache_store.yml
, changecache_store: redis_store
tocache_store: redis_cache_store
- Edit
config/redis.yml
, changeservers
tourl
Troubleshooting
NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
Try to install concurrent-ruby:
> rm Gemfile.rails61.lock
> bundle add concurrent-ruby --version 1.3.4