instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.52k stars 2.45k forks source link

Bundle coun't find compatible versons for bundler #2047

Closed Musicminion closed 2 years ago

Musicminion commented 2 years ago

Summary:

image

Steps to reproduce:

Verson Ubuntu 18.04 Verson Branch: stable/2021-11-10

1.Follow the instruction of the Production Start 2.Execute canvas_init start 3.Failer

I try execute bundler -v, and find my verson is excatly 2.2.19, which meets the GEMFILE requirement!

So, did anyone meet this probelm, to? All in all, this problem will not affect the open of this website, however ,Automated jobs can't do totally!

Expected behavior:

Start succeed

Actual behavior:

ERROR

Additional notes:

Musicminion commented 2 years ago

Can I change my gemfile?IF can, where is it? Or there is something woring with the SYSTEM ENVIRONMENT? I can't tell, and I am also confused with the output of bundle -v , which tells the verson are not compatible.

amg-web commented 2 years ago

first check your bundle version: bundle -v

if it's wrong search about changing default bundler version

Musicminion commented 2 years ago

first check your bundle version: bundle -v

if it's wrong search about changing default bundler version

thanks! After input bundle -v cmd, it shows 2.2.19, I am considering if I need to change my Gemfile?

I didn't install any other verson of bundle, I am quite sure!

Musicminion commented 2 years ago

first check your bundle version: bundle -v

if it's wrong search about changing default bundler version

image

Musicminion commented 2 years ago

changing default bundler version

So, is there anything woring?

image

amg-web commented 2 years ago

check: gem list bundler and bundler version at the bottom of Gemfile.lock

Musicminion commented 2 years ago

the results are as following:

I check the Gemfile.lock in /var/canvas path, however, I am not sure about which Gemfile.lock do you mean?

thanks!!~

image

image

amg-web commented 2 years ago

try to set default bundler: gem install bundler --version 2.2.19 --default

Musicminion commented 2 years ago

try to set default bundler: gem install bundler --version 2.2.19 --default

Amazing! why 2.1.4?

image

amg-web commented 2 years ago

gem env

Musicminion commented 2 years ago

gem env

image

Musicminion commented 2 years ago

gem env

image

amg-web commented 2 years ago

https://stackoverflow.com/questions/54761120/rails-how-to-change-bundler-default-version

Musicminion commented 2 years ago

https://stackoverflow.com/questions/54761120/rails-how-to-change-bundler-default-version

Amazing!!!more than thanks~ I have solved this problem!! Thanks for your help you provided! Good luck to you!

image

Musicminion commented 2 years ago

Although I find this still a little puzzing, I still want to record the step I takes, for anyone who may also encounter this problem!

As you can see, you will find versons of bundle are not compatible.

  1. Execute gem install bundler --version 2.2.19 --default
  2. Execute bundle -v, and at this time, I find my verson are 2.1.4, however Execute gem list bundler, the result are 2.2.19
  3. Simply run the command gem environment | grep "INSTALLATION DIRECTORY" to get your ruby installation directory, I find two directory, just ignore the user directory!
  4. navigate to the specifications/default directory of the INSTALLATION PATH, here is an example for your reference :cd /home/mycomputer/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/specifications/default
  5. Execute rm bundler-2.2.19.gemspec
  6. Execute gem install --default bundler -v 2.2.19
  7. gem update --system
  8. gem list bundler, now I find my verson is 2.3.12

So, in conclusion, I guess developer my update their bundle verson, However, they may forget to update install file in the branch Verson Branch: stable/2021-11-10, So the message conveys the wrong signal, just update your bundle to the lateset verson? That‘s all, thanks.

Finally, I also want to express my gratitude to amg-web, without your help, I can't solve this problem so quickly definitely.

Musicminion commented 2 years ago

Problem Solved, Thanks @amg-web

Musicminion commented 2 years ago

从 Windows 版邮件发送

发件人: anmg 发送时间: 2022年4月21日 22:47 收件人: instructure/canvas-lms 抄送: Musicminion; Author 主题: Re: [instructure/canvas-lms] Bundle coun't find compatible versonsfor bundler (Issue #2047)

gem env — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>