• [^] # Re: Rails ne dépend plus de mimemagic

    Posté par (site web personnel) . En réponse à l’entrée du suivi Le script de build docker-compose de linuxfr n'est pas à jour. Évalué à 2 (+0/-0). Dernière modification le 15 février 2026 à 19:54.

    Au temps pour moi, j'avais pas vu ca.

    J'avance, maintenant si je me connecte sur http://dlfp.lo j'arrive sur la page mais ca me dit:

    Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development 
    

    D'après la doc (NdM: lien mis à jour), je dois lancer docker-compose run linuxfr.org bin/rails db:migrate, sauf que ca me pète une erreur:

    $ docker-compose run linuxfr.org bin/rails db:migrate
    Starting linuxfrorg_database-test_1 ... done
    Starting linuxfrorg_redis_1 ... done
    Starting linuxfrorg_database_1 ... done
    rails aborted!
    StandardError: An error has occurred, all later migrations canceled:
    Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
     class CreateUsers < ActiveRecord::Migration[4.2]
    /var/lib/gems/2.3.0/gems/activerecord-5.2.5/lib/active_record/migration.rb:528:in `inherited'
    /linuxfr.org/db/migrate/20090105233501_create_users.rb:2:in `<main>'
    [...]
    Caused by:
    StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
    [...]
    Tasks: TOP => db:migrate
    (See full trace by running task with --trace)

    Merci de ton aide déjà!