padrino/padrino-framework · error

MIGRATION_VERSION is required

Error message

MIGRATION_VERSION is required

What it means

Error "MIGRATION_VERSION is required" thrown in padrino/padrino-framework.

Source

Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/activerecord.rb:376

  def firebird_db_string(config)
    FireRuby::Database.db_string_for(config.symbolize_keys)
  end

  def catch_error(type, error, config)
    $stderr.puts(*error.backtrace)
    $stderr.puts error.inspect
    case type
    when :create
      $stderr.puts "Couldn't create database for #{config.inspect}"
    when :drop
      $stderr.puts "Couldn't drop #{config[:database]}"
    end
  end

  def migrate_as(type)
    version = env_migration_version
    raise 'MIGRATION_VERSION is required' unless version

    if less_than_active_record_5_2?
      ActiveRecord::Migrator.run(type, 'db/migrate/', version)
    else
      migration_context.run(type, version)
    end

    dump_schema
  end

  def move_as(type)
    step = ENV['STEP'] ? ENV['STEP'].to_i : 1

    if less_than_active_record_5_2?
      ActiveRecord::Migrator.send(type, 'db/migrate/', step)
    else
      migration_context.send(type, step)
    end

View on GitHub (pinned to 167044f3d5)

When it happens

Trigger: Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/activerecord.rb:376 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of padrino/padrino-framework@167044f3d5 (2026-08-23). Data as JSON: /api/errors/347b8ef196aa2df3. Report an issue: GitHub.