Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.3K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda