Error:Bundler could not find compatible versions for gem "jekyll"

Hello,
I just installed a gem for jekyll theme in Win Dev Environment.
Then run bundle exec jekyll serve
and I got a error

Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    jekyll (~> 4.3.1)

    moonwalk (~> 0.1.3) was resolved to 0.1.3, which depends on
      jekyll (~> 4.2.0)

My gemfile is this

# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"

I don’t know how to change the gemfile.
I’ve absolutely no idea how to fix this. Could anyone help me, I’d really appreciate it!
Thank you very much! :pray:

I think this is cause the gemfile.lock in that theme is pegged to jekyll 4.2? I don’t understand the gem version patterns so not sure exactly if that is the case but I think that is what your error says - it found 4.3.1 but is looking for 4.2.0 cause the lock file is asking for that.

I think this is coming from the gemfile.lock, generally I think it is ok to delete the gemfile.lock and see if that works. The gemfile.lock is a list of dependencies that worked at one point but doesn’t mean that a new set won’t work. Not uncommon in my experience to have errors caused by the lock file.

Thanks for your advise. It works when I delete the gemfile.lock.