Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

325
Vistas
Rails 7 Ruby 3.1 LoadError: no se puede cargar dicho archivo -- net/smtp

Actualicé a Rails 7 y Ruby 3.1. Al intentar ejecutar pruebas con rspec , recibí el siguiente error. ¿Cómo puedo arreglarlo?

 An error occurred while loading rails_helper. Failure/Error: require File.expand_path('../config/environment', __dir__) LoadError: cannot load such file -- net/smtp # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require' # .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require' # .../gems/mail-2.7.1/lib/mail.rb:9:in `<module:Mail>' # .../gems/mail-2.7.1/lib/mail.rb:3:in `<main>' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' # .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require' # .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox/mail_ext.rb:3:in `<main>' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' # .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require' # .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox.rb:3:in `<main>' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' # .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require' # .../bundler/gems/rails-6a0f6c4d70b1/actionmailbox/lib/action_mailbox/engine.rb:9:in `<main>' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' # .../gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' # .../gems/zeitwerk-2.5.2/lib/zeitwerk/kernel.rb:36:in `require' # ./config/application.rb:11:in `<top (required)>' # ./config/environment.rb:2:in `require_relative' # ./config/environment.rb:2:in `<top (required)>' # ./spec/rails_helper.rb:4:in `require' # ./spec/rails_helper.rb:4:in `<top (required)>' No examples found. Finished in 0.00005 seconds (files took 0.57758 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

UPD: el 6 de enero de 2022 se lanzó Rails 7.0.1:

El enfoque de esta versión es brindar soporte a Ruby 3.1

Entre otros problemas relacionados con Ruby 3.1, trajo una solución para este problema. Así que actualice a Rails >= 7.0.1 .


Agregue gem 'net-smtp', require: false a su Gemfile y ejecute bundle .

Del mismo modo, supongo que puede tener problemas con net-imap y net-pop y, por lo tanto, debe agregarlos hasta que se publique una nueva versión de mail gem.

Solicitudes de extracción y problemas relacionados:

  • mikel/mail: agregue las gemas predeterminadas anteriores como una dependencia para la compatibilidad con Ruby 3.1
  • Agregue la gema net/smtp para las plantillas de informes de errores para admitir Ruby 3.1
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda