title: Cannot generate models in Rails: incompatible library version
body: <p>So I tried to generate a model via this command: </p>
  
  <blockquote>
    <p>rails generate model Comment commenter:string body:text article:references </p>
  </blockquote>
  
  <p>And got the following error:</p>
  
  <pre><code>/Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/msgpack-1.3.1/lib/msgpack.rb:11:in `require': incompatible library version - /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/msgpack-1.3.1/lib/msgpack/msgpack.bundle (LoadError)
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/msgpack-1.3.1/lib/msgpack.rb:11:in `rescue in &lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/msgpack-1.3.1/lib/msgpack.rb:8:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `require'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `block in &lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/explicit_require.rb:43:in `rescue in with_gems'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/explicit_require.rb:39:in `with_gems'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache.rb:74:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `require_relative'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/setup.rb:1:in `require_relative'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/setup.rb:1:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/Github/react-on-rails-tutorial/config/boot.rb:4:in `require'
      from /Users/chowjiaying/Github/react-on-rails-tutorial/config/boot.rb:4:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/Github/react-on-rails-tutorial/config/application.rb:1:in `require_relative'
      from /Users/chowjiaying/Github/react-on-rails-tutorial/config/application.rb:1:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:92:in `require'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:92:in `preload'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
      from /Users/chowjiaying/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `&lt;top (required)&gt;'
      from /Users/chowjiaying/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      from /Users/chowjiaying/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      from -e:1:in `&lt;main&gt;'
  </code></pre>
  
  <p>Here's what I've tried:</p>
  
  <ul>
  <li>using gem pristine --all</li>
  <li>uninstalling and reinstalling bootsnap</li>
  <li>updating bundle</li>
  <li>uninstalling and reinstalling bundler</li>
  </ul>
  
  <p>I'm using Ruby 2.6.5 and Rails 6.0.2.1. Any help would be appreciated. </p>