Remove the Gemfile so the build system doesn’t read it.
I need the Gemfile in my repo for non-netlify related scripts. Is there a way to remove it programmatically before the build happens?
Not that I am aware of.
You can trick Netlify into skipping installing gems straight from within your gemfile:
return true if ENV['NETLIFY'] source 'https://rubygems.org' ...
more discussion here: How to ignore a Gemfile when building a site - #15 by fool