title: Jekyll site deployment to Netlify - Error gem bundle install (use Bundler 2 or >) / Failing build
body: <p>I'm using Cloud9 and GitHub (Private Repos). I've been able to deploy basic landing pages to Netlify but I keep getting the same error message when I try to deploy <strong>any</strong> Jekyll sites. Snippet from deployment log:</p>
  
  <pre><code>&gt; Installing gem bundle  
  &gt; You must use Bundler 2 or greater with this lockfile.  
  &gt; Error during gem install  
  &gt; failed during stage 'building site': Build script returned non-zero exit code: 1  
  &gt; Error running command: Build script returned non-zero exit code: 1  
  &gt; Failing build: Failed to build site
  </code></pre>
  
  <p>After many many failed attempts, I created a new test dev environment. Per Jekyll docs I made sure I had the latest Ruby, RubyGems, gcc, g++, make &amp; dependencies. Did the usual config, then Jekyll new test_directory. Steps:</p>
  
  <pre><code>&gt; gem install jekyll bundler  
  &gt; gem install bundle  
  &gt; gem update --system  
  &gt; cd new_directory &amp;&amp; bundle install
  &gt; ~/new_directory/ bundle update  
  &gt; ~/new_directory/ bundle exec jekyll serve  
  *** Works perfectly on localhost *** 
  </code></pre>
  
  <p>At this point everything looks fine (jekyll 3.8.5 - gem 3.0.2 - ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux])<br>
  <strong>Important:</strong></p>
  
  <pre><code>&gt; bundler -v  
  returns  
  &gt; Bundler version 2.0.1
  </code></pre>
  
  <p>After I push to completely new repo, I get the same error message as above:<br>
  <strong>"use Bundler 2 or greater with this lockfile"</strong>  </p>
  
  <p>Snippet from lockfile:  </p>
  
  <pre><code>&gt; DEPENDENCIES  
  &gt; -jekyll (~&gt; 3.8.5)  
  &gt; -jekyll-feed (~&gt; 0.6)  
  &gt; -minima (~&gt; 2.0)  
  &gt; -tzinfo-data  
  &gt; RUBY VERSION  
  &gt; ruby 2.5.1p57  
  &gt; BUNDLED WITH  
  &gt; 2.0.1  
  </code></pre>
  
  <p><strong>I also added this to _config.yml file:</strong>  </p>
  
  <pre><code>&gt; url: "https://infallible-hodgkin-e15692.netlify.com/"
  </code></pre>
  
  <p>And per Netlify docs I added a /.ruby-version file inside my root directory with this line:  </p>
  
  <pre><code>&gt; ruby 2.5.1
  </code></pre>
  
  <p>After updating everything and git push, it still fails to build my site but this time I get a couple new lines on the deploy log:</p>
  
  <pre><code>&gt;** WARNING **  
  &gt; Using custom ruby version ruby 2.5.1, this will slow down the build.  
  &gt; To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.  
  &gt; Included versions: 2.3.6 2.4.3 2.2.9
  </code></pre>
  
  <p>Needless to say I tried switching to each "Included" Ruby -v (rvm use <em>.</em>.*). Went through the process of installing each version and repeated steps above each time. No luck.</p>
  
  <p>Any suggestions as to what to try next are greatly appreciated. Sorry for the long post, I tried being as concise as possible. Please let me know if I missed anything.</p>