How do I disable Rubygems installation?

My app has a Gemfile in the root directory, but it’s not needed for building on netlify. How can I disable automatic bundler/Ruby gem installation during the build process? It’s unnecessarily slowing it down when I only want to install javascript deps on netlify.

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

2 Likes