I am trying to install canvas lms on Debian but in the step called "Database population" (here is a tutorial: (https://github.com/instructure/canvas-lms/wiki/Quick-Start) when I use a command bundle exec rails db:initial_setup i get the error like this:
/var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated digest 3.1.0, but your Gemfile requires digest 3.1.1. Since digest is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports digest as a default gem. (Gem::LoadError)
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:25:in `block in setup'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/spec_set.rb:155:in `each'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/spec_set.rb:155:in `each'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:24:in `map'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/runtime.rb:24:in `setup'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:161:in `setup'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `block in <top (required)>'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:136:in `with_level'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:88:in `silence'
from /var/lib/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `<top (required)>'
from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
From this output I understand that I should have version 3.1.1 but my is 3.1.0 In this tutorial is the same version as mine (3.1.0). Have someone this problem? I am trying to resolve it for couple of days but without any results...
I've tried using this: bundle clean --force deleting the config/dynamic_settings.yml file
I encountered some similar problems before which telling me "You have already activated xxx a.b.c, but your Gemfile requires digest a.d.e.
that happens frequently during developing, seems like canvas use a lot of default gems which are older than the ones come with ruby
bundler need X gem of version1, but you activate X of version2
execute
bundle update xxxto upgrade that gembut sometimes this won't do the trick because it's a default gem, and the bundler require an older version
you have to remove the default gem of that version to force bundler use the required one
for example, I encountered problem which says
and after executing
bundle update json, I found out that won't helpyou have to remove the json-2.6.3 in your gem path
I installed ruby with asdf, so I found and deleted the gem which located at
$HOME/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/specifications/default/json-2.6.3but make sure you backup that default gem in another path if something happens