Re: rake db:migrate does nothing

Mark Coleman
Sun, 08 Jul 2007 23:06:45 -0000

Ambrose wrote:
> Hi Mark
>
> I can absolutely confirm that I cannot get rake db:migrate to apply
> more than 3 migrations. It runs with no errors but will only apply the
> first 3 migrations on every new project I try. So something is clearly
> preventing more than 3 migrations.
>
> Where would I find this environment variable? I''ve looked in
> environment.rb and development.rb and database.yml

Depending on your shell environment, you can do something like

$>echo $VERSION

to see if the environment is set - it''s not a ruby environment
variable,
it would be a shell environment variable that is read when the rake
command is invoked. If this is the problem, doing

$>rake db:migrate VERSION=5

should bypass the problem. On a PC, environment variables are set
somewhere like Control Panel>System>Advanced>Environment Variables
and
might have been added by anything you have installed on your PC. On Mac
and *nix, a variable might be being exported from somewhere else.

HTH

--
Posted via http://www.ruby-forum.com/.