Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.3K
Views
Ruby on Rails error: superclass mismatch for class StringIO (TypeError)

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.

  • ruby version: 2.6.8
  • rails: 6.1.4.1
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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
over 4 years ago · Santiago Trujillo Report

0

None of the above answers worked for me. What happened for me is that I added gem 'rubocop', '~> 0.67.2', require: false to Gemfile and ran bundle install.

This version of rubocop seems to have installed psych as a dependency and then psych has a dependency on stringio and I, correct me if I'm wrong, that must be conflicting with whatever stringio version is being used by bootsnap.

Anyway, to solve it I just deleted the rubocop line I added to Gemfile and added gem 'rubocop', require: false (which installed the latest rubocop version) then ran bundle install again.

over 4 years ago · Santiago Trujillo Report

0

I started getting this error after updating my gems. I tried uninstalling ruby and all my gems, updating rvm, but for me the solution appeared to be updating rubygems.

gem update --system
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!