title: Bundler: can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException) during bundle install with gem
body: <p>I'm executing the following script:</p>
  
  <pre><code>gem install rdoc --no-document
  gem install bundle
  bundle
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>+ gem install rdoc --no-document
  Successfully installed rdoc-6.1.1
  1 gem installed
  + gem install bundle
  Successfully installed bundle-0.0.1
  Parsing documentation for bundle-0.0.1
  Done installing documentation for bundle after 2 seconds
  1 gem installed
  1 gem installed
  + bundle install
  /usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (&gt;= 0.a) with executable bundle (Gem::GemNotFoundException)
      from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
      from /srv/myuser/.gem/ruby/2.5.0/bin/bundle:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>I've added <code>/srv/myuser/.gem/ruby/2.5.0/bin</code> to my path so I was able to install gems.</p>
  
  <p>the <code>gem env</code> shows</p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 2.7.7
    - RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-linux]
    - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/2.5.0
    - USER INSTALLATION DIRECTORY: /srv/myuser/.gem/ruby/2.5.0
    - RUBY EXECUTABLE: /usr/bin/ruby
    - EXECUTABLE DIRECTORY: /usr/bin
    - SPEC CACHE DIRECTORY: /srv/myuser/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /etc
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-linux
    - GEM PATHS:
       - /usr/lib/ruby/gems/2.5.0
       - /srv/myuser/.gem/ruby/2.5.0
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
       - "gem" =&gt; "--user-install"
    - REMOTE SOURCES:
       - https://rubygems.org/
    - SHELL PATH:
       - /usr/local/sbin
       - /usr/local/bin
       - /usr/bin
  </code></pre>
  
  <p><code>gem list</code> shows the installed gems.
  I can also find bundle when I perform:</p>
  
  <pre><code>ls -ltrah /srv/myuser/.gem/ruby/2.5.0/bin
  </code></pre>
  
  <p>I've also tried to install bundler but that didn't also help.
  What am I doing wrong?</p>
  
  <p><code>gem which bundle</code> is showing nothing.<code>gem spec bundle</code> is showing it.</p>
  
  <p>Update: I tried to install bundler before running bundle but the same issue appears while:</p>
  
  <p><code>gem list bundle</code> shows</p>
  
  <pre><code>bundle (0.0.1)
  bundler (2.0.1)
  </code></pre>