Estaba intentando ejecutar rspec en plugins y esto es lo que obtuve:
Parece que se introdujo aquí:
¿Podría faltar base.attribute :chat_send_shortcut, :integer, default: 0?
Estaba intentando ejecutar rspec en plugins y esto es lo que obtuve:
Parece que se introdujo aquí:
¿Podría faltar base.attribute :chat_send_shortcut, :integer, default: 0?
Me encontré con este mismo problema al agregar un nuevo enum. Resulta que tuve que ejecutar explícitamente las migraciones del plugin para el entorno de prueba:
RAILS_ENV=test LOAD_PLUGINS=1 bin/rails db:migrate
Oh, interesante. Pensé que db:migrate incluiría los plugins por defecto.
De hecho, tenía bastantes migraciones esperando los plugins en RAILS_ENV=test.
El error ha desaparecido, ¡gracias!
EDITAR:
De hecho, si usas RAILS_ENV=test bin/rake db:migrate, nota el “bin/”, sí establece LOAD_PLUGINS a 1.

Puedes ver el contenido de bin/rake:
if ENV['RAILS_ENV'] == 'test' && ENV['LOAD_PLUGINS'].nil?
if ARGV.include?('db:migrate') || ARGV.include?('parallel:migrate')
STDERR.puts "Estás intentando ejecutar migraciones en tu entorno de prueba y no estás cargando plugins, estableciendo LOAD_PLUGINS a 1"
ENV['LOAD_PLUGINS'] = '1'
end
end
En algún momento, probablemente dejé de escribir bin/ por pereza
.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.