cadqc (4) [Avatar] Offline
#1
Hi,
I have MySQL and Rails 2.1 on a mac
I want to use the iteration source code as provided.

I first modified the newdb.bat before running it (and also create.sql) as follow

mysql -h localhost -u root -p <db/create.sql >
rake db:migrate
rake db:fixtures:load

drop database if exists pomodo_development;
create database pomodo_development;
drop database if exists pomodo_test;
create database pomodo_test;
drop database if exists pomodo_production;
create database pomodo_production;
GRANT ALL PRIVILEGES ON pomodo_development.* TO 'pomodo'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON pomodo_test.* TO 'pomodo'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON pomodo_production.* TO 'pomodo'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;

When I run newdb.bat, I get the errors:

: No such file or directorye.sql
(in /Users/cadupont/Documents/DOCS/zigzag/iteration05)
rake aborted!
'on't know how to build task 'db:migrate

(See full trace by running task with --trace)
(in /Users/cadupont/Documents/DOCS/zigzag/iteration05)
rake aborted!
Access denied for user 'pomodo'@'localhost' (using password: YES)

(See full trace by running task with --trace)

thanks for your help
cadqc (4) [Avatar] Offline
#2
Re: Using iterations source
actually, the problem is the password when I migrate... (the password of the db with user pomodo@localhost)... but how do I solve that...?
cadqc (4) [Avatar] Offline
#3
Re: Using iterations source
another question; when we import a RoR project, do we also have to generate some project files or internal data of some sort by running "rails yourproject"? or we just work with the files that are there..?
peterarmstrong (94) [Avatar] Offline
#4
Re: Using iterations source
The completed iterations in the book code zip file are self-contained; you should be able to unzip it and run any of them just changing database.yml.

Cheers,
Peter
cadqc (4) [Avatar] Offline
#5
Re: Using iterations source
thanks, it worked.