Hello,
I was dealing with both of these issues today and was heartened to see that I have a companion moaning in the hospital bed beside me.
Luke: I followed your advice and fixed the Bundler by downgrading to 2.0.1 - worked like a charm.
Now I am dealing with the ruby version situation. I am using windows and installed ruby using the windows ruby installer which yielded me the very specific ruby version 2.6.5p114. So I took your advice and specified the ruby version in a .ruby-version file. When I set .ruby-version to 2.6.2 (to mirror what I found that the Netlify ubuntu server is set up with), the deploy log showed:
"9:02:09 PM: Your Ruby version is 2.6.2, but your Gemfile specified 2.6.5p114
9:02:09 PM: Error during gem install"
(I don’t see any specs regarding ruby or the very specific 2.6.5p114 in my Gemfile… so not sure where it’s getting that. Maybe it’s encoded somehow.)
When I set .ruby-version to 2.6.5 (to mirror my local ruby install), the deploy log showed:
" 9:16:14 PM: Installing gem bundle
9:16:14 PM: /opt/buildhome/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe’: Could not find ‘bundler’ (2.0.1) required by your /opt/build/repo/Gemfile.lock. (Gem::GemNotFoundException)
9:16:14 PM: To update to the latest version installed on your system, run bundle update --bundler
.
9:16:14 PM: To install the missing version, run gem install bundler:2.0.1
9:16:14 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 1
9:16:14 PM: from /opt/buildhome/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path’
9:16:14 PM: from /opt/buildhome/.rvm/rubies/ruby-2.6.5/bin/bundle:30:in `’
9:16:14 PM: from /opt/buildhome/.rvm/rubies/ruby-2.6.5/bin/ruby_executable_hooks:24:in `eval’
9:16:14 PM: from /opt/buildhome/.rvm/rubies/ruby-2.6.5/bin/ruby_executable_hooks:24:in `’
9:16:14 PM: Error during gem install
9:16:14 PM: Error running command: Build script returned non-zero exit code: 1
9:16:14 PM: Failing build: Failed to build site
9:16:14 PM: Finished processing build request in 39.66382542s"
I double-checked after reading this and I still have Bundler v 2.0.1, so not sure why it’s coming up with that message. As for the Ruby versions, it seems like it’s using rvm to download my specific ruby version and it’s gumming up the works. I welcome your take on what’s going on and any ideas as to how to fix this problem and get my site back up.
Thank you for your time and head scratching.
-Reg