Bundle install could not find compatible versions for gem “bundler”

前端 未结 4 1791
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 19:25

When I type bundle install I got this error. I tried to find solution but nothing solve my case. Please help me.

 Bundler could not find compatible versions          


        
4条回答
  •  滥情空心
    2020-12-28 20:26

    Your bundler gem is too big. You can downgrade for now by changing your gemfile to specify the lower version, and deleting the lock file again.

    gem 'bundler', '1.17.1' 
    

    Then try these commands in the terminal

    gem install bundler -v 1.17.1
    gem uninstall bundler -v 2.0.1
    bundle update --bundler
    bundle install
    

    That last install command might be redundant. I'm on my phone so I can't test anything unfortunately.

    Best of luck!

    EDIT:

    This is now a Heroku issue. Got it. Heroku docs regarding Bundler

    Libraries The following libraries are used by the platform for managing and running >Ruby applications and cannot be specified. For application dependency resolution and management, bundler is installed based on the contents of your Gemfile.lock. If you have a BUNDLED WITH in your Gemfile.lock then you will receive a different version of Bundler:

    Applications specifying Bundler 2.x in their Gemfile.lock will receive bundler: 2.0.1 Applications specifying Bundler 1.x in their Gemfile.lock will receive bundler: 1.15.2 Applications with no BUNDLED WITH in their Gemfile.lock will default to bundler: 1.15.2 For more information on available settings see Bundler configuration. For more information on why we only support a specific set of bundler versions, please see this article about your Bundler version.

    So it seems like Heroku only allows certain versions of Bundler to be compatible, relevant doc is linked. Downgrade to 1.15.2 and give it another shot.

提交回复
热议问题