Show Articles


Rake migrate


         I am creating a new application. When I type the following in
the cmd prompt the get a error;

c:\>ruby>app>ruby db:migrate

rake aborted!
no such file to load --postgres

Please give me some idea abt resolving it.



Hi Daniel,

never faced such problems,

normal usage is

rake migrate

which uses development environment settings for connecting to db

if you want to migrate on production environment use this

rake migrate RAILS_ENV=production

hope this helps.

if you still have issues, give relevant contents from database.yml, and

will try to help

you seem to be using windows and error shows postgres, hope it is not
different database in development and production :)

A.Senthil Nayagam



I am getting something similar, and do not know what do.
This is what I get:

rake aborted!
Don't know how to build task 'db:migrate'

I am trying to follow the Agile Web Development with Rails 2nd ed, and
am getting stuck right at the beginning of creating the Depot

I am running on Windows XP, and have installed Ruby via InstantRails
(1.0 final).

Any help greatly appreciated -- as I am stuck and cannot proceed.
- Paul


please run following command on your app

ruby script/about

please confirm you have followed the procedure

1) you have created a rails project
2) configured db
3) use migrations for creating models
4) you have a file "Rakefile" in your rails project directory
5) you are running "rake" in your rails project directory

now please tell about your os, and mysql version,
can you connect to mysql with with phpmyadmin.

if you cannot sort out the issue, please paste the output of "ruby
script/about" will investigate

A.Senthil Nayagam






rails, tags: rake, migrate, migration, rails
created:06/21/2006 10:04PM
Live Search:


Best of My Posts