This has happened at least twice now, so I thought I'd share a workaround.
If you do a production migration in Rails:
RAILS_ENV=production rake db:migrate
and it dies with:
(in /path/to/some/project)
rake aborted!
ORA-04043: object plural_name_of_a_model does not exist
/path/to/some/project/Rakefile:10
(See full trace by running task with --trace)
Then, first try using the --trace option:
RAILS_ENV=production rake db:migrate --trace
If the error is coming from a controller, move that controller and any others that fail to the base project directory (or somewhere outside of where it is supposed to be) and then run the migration again.
Be sure to move the controllers back afterwards.
0 comments:
Post a Comment