[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rake db:migrate

Daniel

6/15/2006 8:31:00 AM

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.

5 Answers

senthil.nayagam@gmail.com

6/16/2006 9:17:00 AM

0

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://senthiln...


Daniel wrote:
> 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.

Paul

6/20/2006 10:34:00 PM

0

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

Daniel wrote:
> 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.

senthil.nayagam@gmail.com

6/21/2006 4:20:00 AM

0

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://senthiln...




Paul wrote:
> 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
>
> Daniel wrote:
> > 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.

Paul

6/21/2006 10:43:00 PM

0

I am now using InstantRails-1.3a-win and all is fine.
Thanks for your help.
- Paul

Senthilnayagam wrote:
> 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://senthiln...
>
>
>
>
> Paul wrote:
> > 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
> >
> > Daniel wrote:
> > > 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.

kiol

6/22/2006 3:00:00 AM

0

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

sorry for my poor english:)
Daniel wrote:
> 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.