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

327
Views
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 answers
Answer question

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 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!