Gordon Isnor
Gordon Isnor

Reputation: 2105

Dokku fails due to bundler version

I had a Ruby on Rails app up and running with Dokku. When I tried to deploy it again today, I received the following error:

--> Installing dependencies using bundler 2.0.1
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Activating bundler (2.0.2) failed:
       Could not find 'bundler' (2.0.2) required by your /tmp/build/Gemfile.lock.
       To update to the latest version installed on your system, run `bundle update --bundler`.
       To install the missing version, run `gem install bundler:2.0.2`
       Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', execute `gem env` for more information

       To install the version of bundler this project requires, run `gem install bundler -v '2.0.2'`
       Bundler Output: Activating bundler (2.0.2) failed:
       Could not find 'bundler' (2.0.2) required by your /tmp/build/Gemfile.lock.
       To update to the latest version installed on your system, run `bundle update --bundler`.
       To install the missing version, run `gem install bundler:2.0.2`
       Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', execute `gem env` for more information

       To install the version of bundler this project requires, run `gem install bundler -v '2.0.2'`

       !
       !     Failed to install gems via Bundler.

Not sure how to resolve this and was unable to find any references to this type of problem with Dokku.

Upvotes: 1

Views: 701

Answers (2)

gemp
gemp

Reputation: 139

The update didn't change the Bundler version for me.

I solved this by changing the buildpack. Syntax for dokku is:

$ dokku config:set --no-restart YOUR_APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v227

#227 gives Bundler 2.2.16 which works with my installed version 2.2.20.

Here is a list of available buildpacks.

Upvotes: 4

Gordon Isnor
Gordon Isnor

Reputation: 2105

I solved this by updating Dokku using their official documentation. After the update, I had no trouble deploying.

Upvotes: 1

Related Questions