title: Cannot find gem even though bundle reports it is installed
body: <p>I am attempting to install kaminari, but Rails cannot find it or a dependency (I've run into both - currently dependency):</p>
  <pre><code>∴ bundle exec rails g kaminari:config
  Could not find i18n-1.8.4 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  <p>This is despite it being installed:</p>
  <pre><code>∴ bundle info i18n
  The dependency tzinfo-data (&gt;= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
    * i18n (1.8.4)
      Summary: New wave Internationalization support for Ruby
      Homepage: https://github.com/ruby-i18n/i18n
      Path: /Users/shawn/.rvm/gems/ruby-2.6.3@refstats/gems/i18n-1.8.4
  </code></pre>
  <p>I first attempted to delete <code>Gemfile.lock</code>. Same result. Then I deleted the <code>refstats</code> gemset and recreated it. Same result. Then I tried <code>bundle install --force</code> and got same result.</p>
  <p>I've tried both <code>gem 'kaminari', '~&gt; 1.2'</code> and <code>gem 'kaminari'</code> in my <code>Gemfile</code>.</p>
  <p>Any suggestions?</p>
  <p>EDIT:</p>
  <p>Gemfile:</p>
  <pre><code>source 'https://rubygems.org'
  git_source(:github) { |repo| &quot;https://github.com/#{repo}.git&quot; }
  
  ruby '2.6.3'
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '~&gt; 6.0.3', '&gt;= 6.0.3.2'
  # Use sqlite3 as the database for Active Record
  #gem 'sqlite3', '~&gt; 1.4'
  gem 'pg'
  # Use Puma as the app server
  gem 'puma', '~&gt; 4.1'
  # Use SCSS for stylesheets
  gem 'sass-rails', '&gt;= 6'
  # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
  gem 'webpacker', '~&gt; 4.0'
  # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
  gem 'turbolinks', '~&gt; 5'
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
  gem 'jbuilder', '~&gt; 2.7'
  # Use Redis adapter to run Action Cable in production
  # gem 'redis', '~&gt; 4.0'
  # Use Active Model has_secure_password
  # gem 'bcrypt', '~&gt; 3.1.7'
  
  # Use Active Storage variant
  # gem 'image_processing', '~&gt; 1.2'
  
  gem 'devise', '~&gt; 4'
  gem 'kaminari'
  
  # Reduces boot times through caching; required in config/boot.rb
  gem 'bootsnap', '&gt;= 1.4.2', require: false
  
  group :development, :test do
    # Call 'byebug' anywhere in the code to stop execution and get a debugger console
    gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  end
  
  group :development do
    # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
    gem 'web-console', '&gt;= 3.3.0'
    gem 'listen', '~&gt; 3.2'
    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
    gem 'spring'
    gem 'spring-watcher-listen', '~&gt; 2.0.0'
  end
  
  group :test do
    # Adds support for Capybara system testing and selenium driver
    gem 'capybara', '&gt;= 2.15'
    gem 'selenium-webdriver'
    # Easy installation and use of web drivers to run system tests with browsers
    gem 'webdrivers'
  end
  
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
  </code></pre>
  <p>Edit 2:</p>
  <pre><code>∴ cat .ruby-version
  ruby-2.6.3
  </code></pre>
  <p>I have no .ruby-gemset, but my console is reporting I'm using the right one:</p>
  <pre><code>12:36:50 shawn@macbook-pro:~/Documents/uga/refstats (git:master:547a0b4)  ruby-2.6.3@refstats
  ∴
  </code></pre>
  <p>EDIT 3:
  Well, the gremlin has disappeared, though I cannot say why. This is what I did:</p>
  <pre><code>1) Created new test rails app
  2) Bundle install in new gemset
  3) Added kaminari to Gemfile
  4) Bundle install
  5) Generated kaminari config successfully
  6) Switch to non-working app, but forget to switch gemset, putting me in rvm with no gemset. Don't notice. 
  7) Bundle install 
  8) Notice things get installed, including kaminari. Notice I'm on wrong gemset.
  9) Switch to correct gemset.
  10) Bundle install (which installs nothing)
  11) Generate kaminari config successfully
  </code></pre>
  <p>I really cannot say why it started working, unless installing to the rvm root had some effect. But that's what I did, and it's all working now. Thanks for the time.</p>