简体   繁体   中英

Heroku and bundler version

I'm pushing code on Heroku as usual.

But this message appear :

Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running gem install bundler .

So I run:

heroku run gem install bundler

Running gem install bundler on ⬢ myapp... up, run.3401 (Standard-1X)

Fetching: bundler-1.16.1.gem (100%)

Successfully installed bundler-1.16.1

Parsing documentation for bundler-1.16.1

Installing ri documentation for bundler-1.16.1

Done installing documentation for bundler after 11 seconds

1 gem installed

But when I retry to push code:

heroku run bundle install

Running bundle install on ⬢ myapp... up, run.9532 (Standard-1X)

Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running gem install bundler .

In the gem Gemfile.lock I got:

BUNDLED WITH 1.16.1

I don't understand why this bundler release doesn't want to be install on Heroku.

Bundler 1.15.2 is the version that is pre-installed on Heroku dynos. Changing Bundler to 1.16.1 on your machine doesn't change the version installed on Heroku.

Furthermore, you cannot update Bundler on Heroku by running bundle install . And even if that was possible it would take effect on the next run of Bundler - and usually, you only bundle once on a Heroku dyno.

My advice is: It is just a warning, just ignore it and let's hope that Heroku updates Bundler more ofter in the future.

You also want to make sure you're using a standard Heroku buildpack for this.

When I attempted to upgrade my app from Cedar to Heroku-20, it kept failing with this same bundler error. But, eventually, I remembered that I had install a custom buildback and that turned out to be the source of the incorrect bundler version.

Once I switched back to the default Heroku Ruby buildpack, I was finally able to deploy without any issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM