A
anansi
Hi,
I wanna write a little blog in ruby so I started with creating a
mysql-db with blog_test, blog_development, blog_production. Then I
created a new rails project with "rails blog". I create, in the folder
db, a file create.sql with this content:
drop table if exists entrys;
create table entrys (
id int not null auto_increment,
headline varchar(100) not null,
news text not null,
primary key (id)
);
then I did:
mysql blog_development <db/create.sql
which works without problems. After that I changed /config/database.yml:
development:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_development
username: anansi
password:
host: localhost
test:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_test
username: anansi
password:
host: localhost
production:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_production
username: goldstein
password:
host: localhost
because I needed to update the socketline. But if I wanna now scaffold I
get this error :
ruby script/generate scaffold Entry Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists app/views/layouts/
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/entry.rb
identical test/unit/entry_test.rb
identical test/fixtures/entries.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (Entry)
Can someone tell me what this means? I called the scaffold Entry which
is correctly named for the mysql handling of rails. Why comes this error
and how can I fix it or go around it?
--
greets
(
)
(
/\ .-"""-. /\
//\\/ ,,, \//\\
|/\| ,;;;;;, |/\|
//\\\;-"""-;///\\
// \/ . \/ \\
(| ,-_| \ | / |_-, |)
//`__\.-.-./__`\\
// /.-(() ())-.\ \\
(\ |) '---' (| /)
` (| |) `
jgs \) (/
one must still have chaos in oneself to be able to give birth to a
dancing star
I wanna write a little blog in ruby so I started with creating a
mysql-db with blog_test, blog_development, blog_production. Then I
created a new rails project with "rails blog". I create, in the folder
db, a file create.sql with this content:
drop table if exists entrys;
create table entrys (
id int not null auto_increment,
headline varchar(100) not null,
news text not null,
primary key (id)
);
then I did:
mysql blog_development <db/create.sql
which works without problems. After that I changed /config/database.yml:
development:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_development
username: anansi
password:
host: localhost
test:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_test
username: anansi
password:
host: localhost
production:
adapter: mysql
socket: /var/run/mysqld/mysqld.sock
database: blog_production
username: goldstein
password:
host: localhost
because I needed to update the socketline. But if I wanna now scaffold I
get this error :
ruby script/generate scaffold Entry Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists app/views/layouts/
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/entry.rb
identical test/unit/entry_test.rb
identical test/fixtures/entries.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (Entry)
Can someone tell me what this means? I called the scaffold Entry which
is correctly named for the mysql handling of rails. Why comes this error
and how can I fix it or go around it?
--
greets
(
)
(
/\ .-"""-. /\
//\\/ ,,, \//\\
|/\| ,;;;;;, |/\|
//\\\;-"""-;///\\
// \/ . \/ \\
(| ,-_| \ | / |_-, |)
//`__\.-.-./__`\\
// /.-(() ())-.\ \\
(\ |) '---' (| /)
` (| |) `
jgs \) (/
one must still have chaos in oneself to be able to give birth to a
dancing star