title: How to change default gem version
body: <p>Any help would be greatly appreciated!</p>
  
  <p>I tried to reconfigure my GitLab after running a bundle update. But ran into the error listed below.</p>
  
  <p>Most of the time this type of error is reported the gem that it is conflicting with will be listed in the error, but mine just says that it is having trouble with chef, so I am not sure what the real issue is here.</p>
  
  <p>At this point I am on a clean install of GitLab. I have just ran a bundle update without issue. Tried to run a Gitlab-ctl reconfigure and got the error listed below. </p>
  
  <p><strong>Ruby Version:</strong> ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]</p>
  
  <p><strong>RVM Version:</strong> rvm 1.26.10</p>
  
  <p><strong>Installed JSON Versions:</strong> json (1.8.1)</p>
  
  <p>I have tried:</p>
  
  <p><ul>
  <li>Bundle install</li>
  <li>Bundle update</li>
  <li>Install the newer version of json (1.8.2) then uninstall the older json
  <ul>
  <li>It gives me the following error when I try to uninstall version 1.8.1:</p>
  
  <blockquote>
    <p><strong>ERROR:  While executing gem ... (Gem::InstallError)
    gem "json" cannot be uninstalled because it is a default gem</strong></li>
    </ul></li>
    <li>Uninstall and reinstall ruby</li>
    <li>Set default ruby</li>
    <li>Add json to the Gemfile</p>
    
    <blockquote>
      <p><strong>gem "json", "~> 1.8.1"</strong></li>
      <li>Edited the Gemfile.lock to use the correct json</li>
      <li>Deleted the Gemfile.lock</li>
      </ul>
      <strong>Error:</strong></p>
    </blockquote>
  </blockquote>
  
  <pre><code>/opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2052:in `raise_if_conflicts': can't activate json-1.8.2, already activated json-1.8.1 (Gem::LoadError)
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1262:in `activate'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:96:in `block in require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:95:in `each'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:95:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/json_compat.rb:20:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/http/json_input.rb:20:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/rest.rb:32:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/search/query.rb:21:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/dsl/data_query.rb:19:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/mixin/language.rb:20:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/dsl/platform_introspection.rb:217:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/resource.rb:21:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/dsl/recipe.rb:20:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider.rb:22:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/execute.rb:21:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/script.rb:20:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/windows_script.rb:19:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/batch.rb:19:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/providers.rb:19:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef.rb:25:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application/solo.rb:19:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
          from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/bin/chef-solo:23:in `&lt;top (required)&gt;'
          from /opt/gitlab/embedded/bin/chef-solo:23:in `load'
          from /opt/gitlab/embedded/bin/chef-solo:23:in `&lt;main&gt;'
  </code></pre>