Rake db:migrate

D

Daniel

Hi..
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

Error:
rake aborted!
no such file to load --postgres

Please give me some idea abt resolving it.

Thanks,
Daniel.
 
S

Senthilnayagam

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
environment.rb

will try to help

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

regards
A.Senthil Nayagam
http://senthilnayagam.com
 
P

Paul

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
application.

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
 
S

Senthilnayagam

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

regards
A.Senthil Nayagam
http://senthilnayagam.com
 
K

kiol

if you use postgresql,maybe you need change "postgres" to "postgresql"
in your database.yml file.

sorry for my poor english:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

"rake db:migrate" error 1
Rake aborted??? 1
rake db:migrate command question 1
rake aborted problem 0
why this rake db:migrate error 3
Rake BackgrounDRb Problem 1
rails mysql db:migrate etc 1
Migration 3

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top