I am getting an error while creating a ruby on rails project. In command, I created a new project by typing rails new club, then bundle. Now, when I try to create my models and controllers by typing and entering rails g resource Club name, I get this error: superclass mismatch for class StringIO (TypeError).
gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:
in `require': superclass mismatch for class StringIO (TypeError)
I don't even has a class named StringIO, so I'm not sure where it came from.
Try reverting to an earlier version of StringIO
gem install stringio -v 0.1.4
gem uninstall stringio # remove 3.0.0 and 3.0.1
As others have said on @jason-lee answer, for many people, this can be fixed just by uninstalling the existing stringio then running bundle install again.
gem uninstall stringio
bundle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With