title: How to solve bundler LoadError
body: <p>I am using rvm and running Ruby 2.6.1 and using rails 5.2.2. When I try <code>bundler -v</code>
  I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
      3: from /home/amairu/.rvm/gems/ruby-2.6.1@rails522/bin/ruby_executable_hooks:24:in `&lt;main&gt;'
      2: from /home/amairu/.rvm/gems/ruby-2.6.1@rails522/bin/ruby_executable_hooks:24:in `eval'
      1: from /home/amairu/.rvm/gems/ruby-2.6.1@rails522/bin/bundler:23:in `&lt;main&gt;'
  /home/amairu/.rvm/gems/ruby-2.6.1@rails522/bin/bundler:23:in `load': cannot load such file -- /home/amairu/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundler (LoadError)
  </code></pre>
  
  <p><code>gem list bundler</code> returns:</p>
  
  <pre><code>*** LOCAL GEMS ***
  
  bundler (2.0.2, default: 1.17.3, 1.17.2)
  bundler-unload (1.0.2)
  rubygems-bundler (1.4.5)
  </code></pre>
  
  <p>It seems that it is trying to look for the file named "bundler" in <code>/home/amairu/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/</code> folder but there is no such file. The required file is in  a different folder: </p>
  
  <p><code>ls /home/amairu/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/</code></p>
  
  <p><code>&gt; bundler</code> </p>
  
  <p>How can I set it such that the <code>bundler -v</code> command looks into the <code>bundler-1.17.2/exe instead of the bundler-1.17.3/exe</code>? In other words I need to set the default bundler version as 1.17.2 instead of 1.17.3
  I have run:</p>
  
  <pre><code>gem uninstall bundler
  gem install bundler
  bundle install
  </code></pre>
  
  <p>Which install successfully but still I get an error with bundler -v.
  A similar post suggest reinstalling Rails <code>gem install rails -v 5.2.2</code> but this did not fix my issue. </p>