Netlify cannot deploy due to bundler version on Middleman

The current version of middleman uses an older version of bundler but Netlify uses 2.0.1. I contacted Netlify but nothing can be done unless Middleman upgrades to use the newer version of bundler.

1:54:24 AM: middleman-core (4.2.1) has dependency bundler (~> 1.1), which is unsatisfied by the current bundler version 2.0.1, so the dependency is being ignored

Full log

1:53:41 AM: Build ready to start
1:53:43 AM: build-image version: 84aca9ba39e0ee86ba194760fbfc51a808f62543
1:53:43 AM: buildbot version: 1ac64ca11e029436ed45ac81a38b9839778ec314
1:53:43 AM: Fetching cached dependencies
1:53:43 AM: Starting to download cache of 254.8KB
1:53:43 AM: Finished downloading cache in 82.14984ms
1:53:43 AM: Starting to extract cache
1:53:43 AM: Failed to fetch cache, continuing with build
1:53:43 AM: Starting to prepare the repo for build
1:53:44 AM: No cached dependencies found. Cloning fresh repo
1:53:44 AM: git clone https://github.com/dlee11/portfolio
1:53:49 AM: Preparing Git Reference refs/heads/master
1:53:50 AM: Starting build script
1:53:50 AM: Installing dependencies
1:53:51 AM: Downloading and installing node v8.15.0...
1:53:51 AM: Downloading https://nodejs.org/dist/v8.15.0/node-v8.15.0-linux-x64.tar.xz...
1:53:52 AM:   0.9%
1:53:52 AM: 
######
1:53:52 AM:                      9.1%
1:53:52 AM: 
##########################################################
1:53:52 AM: #############   99.1%
1:53:52 AM: 
##############
1:53:52 AM: ########################################################## 100.0%
1:53:52 AM: Computing checksum with sha256sum
1:53:52 AM: Checksums matched!
1:53:54 AM: Now using node v8.15.0 (npm v6.4.1)
1:53:55 AM: Required ruby-2.3.1 is not installed.
1:53:55 AM: To install do: 'rvm install "ruby-2.3.1"'
1:53:55 AM: Attempting ruby version ruby-2.3.1, read from .ruby-version file
1:53:56 AM: 
1:53:56 AM: ** WARNING **
1:53:56 AM: Using custom ruby version ruby-2.3.1, this will slow down the build.
1:53:56 AM: To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
1:53:56 AM: Included versions: 2.3.6 2.4.3 2.2.9
1:53:56 AM: 
1:53:56 AM: Required ruby-2.3.1 is not installed - installing.
1:53:57 AM: Searching for binary rubies, this might take some time.
1:53:57 AM: Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.3.1.tar.bz2
1:53:57 AM: Checking requirements for ubuntu.
1:53:58 AM: Requirements installation successful.
1:53:58 AM: ruby-2.3.1 - #configure
1:53:58 AM: ruby-2.3.1 - #download
1:54:00 AM: No checksum for downloaded archive, recording checksum in user configuration.
1:54:00 AM: ruby-2.3.1 - #validate archive
1:54:10 AM: ruby-2.3.1 - #extract
1:54:15 AM: ruby-2.3.1 - #validate binary
1:54:16 AM: ruby-2.3.1 - #setup
1:54:16 AM: ruby-2.3.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.3.1@global
1:54:16 AM: ruby-2.3.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems
1:54:18 AM: .........................................................
1:54:18 AM: ruby-2.3.1 - #generating global wrappers
1:54:19 AM: .......
1:54:19 AM: ruby-2.3.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.3.1
1:54:19 AM: ruby-2.3.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
1:54:19 AM: ruby-2.3.1 - #generating default wrappers
1:54:19 AM: .......
1:54:19 AM: Using /opt/buildhome/.rvm/gems/ruby-2.3.1
1:54:20 AM: Using ruby version 2.3.1
1:54:20 AM: Using PHP version 5.6
1:54:20 AM: Started restoring cached ruby gems
1:54:20 AM: Finished restoring cached ruby gems
1:54:20 AM: Installing gem bundle
1:54:20 AM: The dependency wdm (~> 0.1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32`.
1:54:20 AM: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 java`.
1:54:22 AM: Fetching gem metadata from https://rubygems.org/
1:54:22 AM: .
1:54:22 AM: .
1:54:22 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:23 AM: .
1:54:24 AM: middleman-core (4.2.1) has dependency bundler (~> 1.1), which is unsatisfied by the current bundler version 2.0.1, so the dependency is being ignored
1:54:24 AM: Fetching concurrent-ruby 1.0.5
1:54:24 AM: Installing concurrent-ruby 1.0.5
1:54:24 AM: Fetching i18n 0.7.0
1:54:24 AM: Installing i18n 0.7.0
1:54:25 AM: Fetching minitest 5.10.1
1:54:25 AM: Installing minitest 5.10.1
1:54:25 AM: Fetching thread_safe 0.3.6
1:54:25 AM: Installing thread_safe 0.3.6
1:54:25 AM: Fetching tzinfo 1.2.2
1:54:25 AM: Installing tzinfo 1.2.2
1:54:25 AM: Fetching activesupport 5.0.2
1:54:25 AM: Installing activesupport 5.0.2
1:54:25 AM: Fetching public_suffix 2.0.5
1:54:25 AM: Installing public_suffix 2.0.5
1:54:25 AM: Fetching addressable 2.5.0
1:54:25 AM: Installing addressable 2.5.0
1:54:25 AM: Fetching backports 3.6.8
1:54:26 AM: Installing backports 3.6.8
1:54:26 AM: Using bundler 2.0.1
1:54:26 AM: Fetching coffee-script-source 1.12.2
1:54:26 AM: Installing coffee-script-source 1.12.2
1:54:26 AM: Fetching execjs 2.7.0
1:54:26 AM: Installing execjs 2.7.0
1:54:26 AM: Fetching coffee-script 2.4.1
1:54:26 AM: Installing coffee-script 2.4.1
1:54:26 AM: Fetching sass 3.4.23
1:54:26 AM: Installing sass 3.4.23
1:54:26 AM: Fetching compass-import-once 1.0.5
1:54:26 AM: Installing compass-import-once 1.0.5
1:54:26 AM: Fetching contracts 0.13.0
1:54:27 AM: Installing contracts 0.13.0
1:54:27 AM: Fetching docile 1.3.1
1:54:27 AM: Installing docile 1.3.1
1:54:27 AM: Fetching dotenv 2.2.0
1:54:27 AM: Installing dotenv 2.2.0
1:54:27 AM: Fetching eventmachine 1.2.3
1:54:27 AM: Installing eventmachine 1.2.3 with native extensions
1:54:44 AM: Fetching http_parser.rb 0.6.0
1:54:45 AM: Installing http_parser.rb 0.6.0 with native extensions
1:54:46 AM: Fetching em-websocket 0.5.1
1:54:46 AM: Installing em-websocket 0.5.1
1:54:46 AM: Fetching erubis 2.7.0
1:54:46 AM: Installing erubis 2.7.0
1:54:46 AM: Fetching fast_blank 1.0.0
1:54:46 AM: Installing fast_blank 1.0.0 with native extensions
1:54:47 AM: Fetching fastimage 2.1.0
1:54:47 AM: Installing fastimage 2.1.0
1:54:47 AM: Fetching favicon_maker 1.3.1
1:54:47 AM: Installing favicon_maker 1.3.1
1:54:47 AM: Fetching ffi 1.9.18
1:54:47 AM: Installing ffi 1.9.18 with native extensions
1:54:57 AM: Fetching tilt 2.0.7
1:54:57 AM: Installing tilt 2.0.7
1:54:58 AM: Fetching haml 4.0.7
1:54:58 AM: Installing haml 4.0.7
1:54:58 AM: Fetching hamster 3.0.0
1:54:58 AM: Installing hamster 3.0.0
1:54:58 AM: Fetching hashie 3.5.5
1:54:58 AM: Installing hashie 3.5.5
1:54:58 AM: Fetching kramdown 1.13.2
1:54:58 AM: Installing kramdown 1.13.2
1:54:59 AM: Fetching rb-fsevent 0.9.8
1:54:59 AM: Installing rb-fsevent 0.9.8
1:54:59 AM: Fetching rb-inotify 0.9.8
1:54:59 AM: Installing rb-inotify 0.9.8
1:54:59 AM: Fetching listen 3.0.8
1:54:59 AM: Installing listen 3.0.8
1:54:59 AM: Fetching memoist 0.15.0
1:54:59 AM: Installing memoist 0.15.0
1:54:59 AM: Fetching thor 0.19.4
1:54:59 AM: Installing thor 0.19.4
1:54:59 AM: Fetching middleman-cli 4.2.1
1:54:59 AM: Installing middleman-cli 4.2.1
1:54:59 AM: Fetching padrino-support 0.13.3.3
1:54:59 AM: Installing padrino-support 0.13.3.3
1:54:59 AM: Fetching padrino-helpers 0.13.3.3
1:54:59 AM: Installing padrino-helpers 0.13.3.3
1:55:00 AM: Fetching parallel 1.11.1
1:55:00 AM: Installing parallel 1.11.1
1:55:00 AM: Fetching rack 2.0.1
1:55:00 AM: Installing rack 2.0.1
1:55:00 AM: Fetching servolux 0.13.0
1:55:00 AM: Installing servolux 0.13.0
1:55:00 AM: Fetching uglifier 3.1.9
1:55:00 AM: Installing uglifier 3.1.9
1:55:00 AM: Fetching middleman-core 4.2.1
1:55:00 AM: Installing middleman-core 4.2.1
1:55:01 AM: Fetching middleman 4.2.1
1:55:01 AM: Installing middleman 4.2.1
1:55:01 AM: Fetching middleman-aria_current 0.1.1
1:55:01 AM: Installing middleman-aria_current 0.1.1
1:55:01 AM: Fetching middleman-favicon-maker 4.1.0
1:55:01 AM: Installing middleman-favicon-maker 4.1.0
1:55:01 AM: Fetching rack-livereload 0.3.16
1:55:01 AM: Installing rack-livereload 0.3.16
1:55:01 AM: Fetching middleman-livereload 3.4.6
1:55:01 AM: Installing middleman-livereload 3.4.6
1:55:01 AM: Bundle complete! 6 Gemfile dependencies, 49 gems now installed.
1:55:01 AM: Bundled gems are installed into `/opt/build/cache/bundle`
1:55:01 AM: Post-install message from haml:
1:55:01 AM: HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
1:55:01 AM: your application:
1:55:01 AM: * Support for Ruby 1.8.6 dropped
1:55:01 AM: * Support for Rails 2 dropped
1:55:01 AM: * Sass filter now always outputs <style> tags
1:55:01 AM: * Data attributes are now hyphenated, not underscored
1:55:01 AM: * html2haml utility moved to the html2haml gem
1:55:01 AM: * Textile and Maruku filters moved to the haml-contrib gem
1:55:01 AM: For more info see:
1:55:01 AM: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
1:55:02 AM: Gem bundle installed
1:55:02 AM: Started restoring cached node modules
1:55:02 AM: Finished restoring cached node modules
1:55:02 AM: Installing NPM modules using NPM version 6.4.1
1:55:03 AM: npm
1:55:03 AM:  notice
1:55:03 AM:  created a lockfile as package-lock.json. You should commit this file.
1:55:03 AM: up to date in 0.618s
1:55:03 AM: found 0 vulnerabilities
1:55:03 AM: NPM modules installed
1:55:04 AM: Started restoring cached go cache
1:55:04 AM: Finished restoring cached go cache
1:55:04 AM: unset GOOS;
1:55:04 AM: unset GOARCH;
1:55:04 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
1:55:04 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
1:55:04 AM: go version >&2;
1:55:04 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
1:55:04 AM: go version go1.10 linux/amd64
1:55:04 AM: Installing missing commands
1:55:04 AM: Verify run directory
1:55:04 AM: Executing user command: middleman build
1:55:04 AM: Activating bundler (< 2) failed:
1:55:04 AM: Could not find 'bundler' (< 2) - did find: [bundler-2.0.1]
1:55:04 AM: Checked in 'GEM_PATH=/opt/buildhome/.rvm/gems/ruby-2.3.1:/opt/buildhome/.rvm/gems/ruby-2.3.1@global', execute `gem env` for more information
1:55:04 AM: To install the version of bundler this project requires, run `gem install bundler -v '< 2'`
1:55:04 AM: Caching artifacts
1:55:04 AM: Started saving ruby gems
1:55:04 AM: Finished saving ruby gems
1:55:04 AM: Started saving node modules
1:55:04 AM: Finished saving node modules
1:55:04 AM: Started saving pip cache
1:55:04 AM: Finished saving pip cache
1:55:04 AM: Started saving emacs cask dependencies
1:55:04 AM: Finished saving emacs cask dependencies
1:55:04 AM: Started saving maven dependencies
1:55:04 AM: Finished saving maven dependencies
1:55:04 AM: Started saving boot dependencies
1:55:04 AM: Finished saving boot dependencies
1:55:04 AM: Started saving go dependencies
1:55:04 AM: Finished saving go dependencies
1:55:04 AM: Cached node version v8.15.0
1:55:05 AM: Cached ruby version 2.3.1
1:55:05 AM: Error running command: Build script returned non-zero exit code: 42
1:55:05 AM: failed during stage 'building site': Build script returned non-zero exit code: 42
1:55:05 AM: Failing build: Failed to build site
1:55:05 AM: Finished processing build request in 1m21.677926998s
1:55:05 AM: Shutting down logging, 0 messages pending

Just cloned your site and deployed it to Netlify. Get rid of these files and you’re good to go:

.ruby-gemset
.ruby-gemset.04.28.2017-03:03:44
.ruby-version
.ruby-version.04.28.2017-03:03:44
1 Like

It worked!! Thanks a lot!!

How did you know to remove those lines to make it work?

It was one of the things noticeably different to a setup I was using on Netlify, so figured I’d just try it out.

Hello tomrutgers,
How did you clone your site and also deployed it to netlify?

@keyrr I removed files that locked ruby and gemset to older versions. If you want I can have a look at your repo. I’ve deployed a bunch of sites to Netlify and never had issues.