title: Run ActiveRecord migrations without Rails
body: <p>I am trying to update a gem called <a href="https://github.com/textacular/textacular/pull/121/files" rel="noreferrer"><code>textacular</code></a> to be compatible with latest rails version.</p>
  
  <p>In the development Rake-tasks we need to run a few ActiveRecord migrations - without Rails.</p>
  
  <p>Today it looks like: </p>
  
  <pre><code>namespace :migrate do
      desc 'Run the test database migrations'
      task :up =&gt; :'db:connect' do
        ActiveRecord::Migrator.up 'db/migrate'
      end
  
      desc 'Reverse the test database migrations'
      task :down =&gt; :'db:connect' do
        ActiveRecord::Migrator.down 'db/migrate'
      end
  end
  </code></pre>
  
  <p>However when using ActiveRecord >= 5, it fails with: </p>
  
  <p><code>NoMethodError: undefined method 'up' for ActiveRecord::Migrator:Class</code>.</p>
  
  <p>I have tried to look through the source code for ActiveRecord, tried a bunch of different methods but have not managed to run the migrations.</p>
  
  <p>Does anyone have a hint of what to do?</p>
  
  <p><strong>Edit</strong></p>
  
  <p><em>Using <code>ActiveRecord::Migration.up</code> does nothing, probably just <code>returns</code> based on the method.</em></p>
  
  <p><em>Using <code>ActiveRecord::Migration.migrate(:up)</code> gives output:</em></p>
  
  <pre><code>==  ActiveRecord::Migration: migrating ========================================
  ==  ActiveRecord::Migration: migrated (0.0000s) ===============================
  </code></pre>
  
  <p>All migrations are in the folder <code>db/migrate</code>.</p>