title: How to run bundle install on gitlab?
body: <p>Yesterday I updated gitlab 8.4.3 to 8.4.4, during upgrading I got an error related to permissions on Gemfile.lock and the upgrading process was interrupted.</p>
  
  <p>Today, I cannot access my gitlab installation, I traced the error to a missing gem, when I run <code>gitlab-rails</code> I got </p>
  
  <pre><code>Could not find ruby-saml-1.1.1 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>When I try to run <code>sudo -u git -H bundle install</code> I got</p>
  
  <pre><code>sudo: bundle: command not found
  </code></pre>
  
  <p>How can I install this gem? Which is the correct way to run bundle install?</p>
  
  <p>gitlab is installed/upgraded via apt-get.</p>
  
  <p><strong>update: 2016-02-22</strong></p>
  
  <p>Turns out that gitlab does not provides a <code>bundle install</code> command, the gems are included in the .deb file. So, all I needed to do was to skip the migrations, just install the new version, and then -once that all the files were correctly installed- run the migrations.</p>
  
  <pre><code>touch /etc/gitlab/skip-auto-migrations
  apt-get dist-upgrade
  gitlab-ctl reconfigure
  </code></pre>
  
  <p><strong><em>protip:</em></strong> When troubleshooting, make sure that everything is correctly installed then run <code>gitlab-ctl reconfigure</code>; it can fix common issues.</p>