Are you developing a Rails 3.0.x app? Are you using slim_scrooge gem?
Did your migration worked on development/test environment, but it looks having problem on production server?
Better: it looks like working but when you check your DB or schema.rb file you see nothing happened?
Before starting with the tricky solution please take care to try the following:
or% This will do the job migration % "bundle exec" will force to use gems of your bundle and % perform it in the Rails Production Environment bundle exec rake db:migrate RAILS_ENV=production
So, now, a question: are you sure having migration files in db/migrate directory? If you have it, please try with:% This will deploy on server and % then perform just last migrations % Use this if you're using Capistrano to deploy on server cap deploy:migrations
If it worked, let's speed it up calling more migrations at once:% Replace your migration version with the one you have to perform. bundle exec rake db:migrate:up RAILS_ENV=production VERSION= YOUR_MIGRATE_VERSION
If you have the following after that command:% Replace step number with the one you have to perform. bundle exec rake db:migrate:up RAILS_ENV=production STEP= HOW_MANY_MIGRATION_YOU_MISS
Ok, finally: my question at the beginning about slim_scrooge was a clue for the solution.rake aborted! No migration with version number YOUR_MIGRATE_VERSION
Take note:
- Comment slim_scrooge gem from your Gemfile
- Deploy your application with the deploy:migrations Capistrano task
- Restore slim_scrooge gem to your Gemfile
- Deploy again your application with deploy Capistrano task
The original solution has been found on StackOverflow.
N.B. This bug was for slim_scrooge version 1.0.12
As long as I see this should be fixed in the 1.0.13 version for Rails 3.1.
Nessun commento:
Posta un commento