Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing migrations from engine won't work

I created a new engine in Rails 3.1.3 and apparently there's that rake task that copies over all migrations. I tried following rake abc:install:migrations which threw:

rake aborted!
Don't know how to build task 'abc:install:migrations'

(See full trace by running task with --trace)

I also tried rake abc_engine:install:migrations with the same result.

Then I read bundle exec rake railties:install:migrations or bundle exec rake railties:install:migrations FROM=abc_engine should do the trick too but no success. Nothing was copied even though no error was thrown.

My migrations are located in db/migrate/ within the engine folder and I ran all commands above from spec/dummy/

Does anyone know how to use this new rake task in order to copy migrations from the engine?

like image 536
Cojones Avatar asked Jan 05 '12 15:01

Cojones


2 Answers

I ran this instead:

rake railties:install:migrations

And my migrations were copied from the engine. Hope this helps.

like image 167
Antonio Avatar answered Oct 15 '22 22:10

Antonio


I finally got found/got lucky with my (similar) issue. For the first error, it just disappeared, not sure why. Then I figured out that I didn't created the migrations using the usual file name format, so the ActiveRecord::Migrator.migrations method was ignoring them.

like image 33
Nicolas Buduroi Avatar answered Oct 15 '22 23:10

Nicolas Buduroi