Hi guys,
I’ve been able to successfully install the postgres adapter for a remote
database machine to get rails up. My machine is running on Fedora 2.
Rails version 1.1.2. Is my yml config correct? I am getting this error
when I execute script/generate scaffold service_contents content :
exists app/controllers/
exists app/helpers/
create app/views/spiel
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/service_spiels.rb
create test/unit/service_spiels_test.rb
create test/fixtures/service_spiels.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (ServiceContents)
Is my yml properly configured? I am currently working with just one db
named dbname. Pls note that all development, test and production
settings are pointing to the same db. I don’t need, therefore, don’t
want to create any other databases for the purposes of separating these
dbs.
development:
adapter: postgresql
database: dbname
username: postgres
password: *********
host:
test:
adapter: postgresql
database: dbname
username: postgres
password: *********
host:
production:
adapter: postgresql
database: dbname
username: postgres
password: *********
host:
What am I doing wrong?
Thanks,
Bing
oh by the way, my table is in fact existing already name
service_contents inside dbname.
thanks,
Bing
You get this message when database cannot be conected or table was not
found.
There could be lots of reasons for that.
Are you able to connect to database outside rails?
Have you installed postgresql connector?
by
TheR
On 6/28/06, Bing T. [email protected] wrote:
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/service_spiels.rb
create test/unit/service_spiels_test.rb
create test/fixtures/service_spiels.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (ServiceContents)
Are you definitely using the command “script/generate scaffold
service_contents content” ? Because it’s creating
service_spiels.rb/yml, which would not match up with a table named
service_contents.
Pat
Damjan R. wrote:
You get this message when database cannot be conected or table was not
found.
There could be lots of reasons for that.
Are you able to connect to database outside rails?
Have you installed postgresql connector?
by
TheR
Yes, I already connect to the database using Ruby. But for Rails, I
can’t get the scaffold up.
thanks,
Bing
Pat M. wrote:
On 6/28/06, Bing T. [email protected] wrote:
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/service_spiels.rb
create test/unit/service_spiels_test.rb
create test/fixtures/service_spiels.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (ServiceContents)
Are you definitely using the command “script/generate scaffold
service_contents content” ? Because it’s creating
service_spiels.rb/yml, which would not match up with a table named
service_contents.
Pat
Hi Pat,
yes, my mistake, I was actually making two sets of scaffolds and I
pasted the wrong error to my inquiry but it I am sure that I get the
same error. whether I do: script/generate scaffold service_contents
content and script/generate scaffold service_spiels spiel
thanks,
Bing
On Thu, 2006-06-29 at 16:55 +0200, Enrico T. wrote:
create app/models/place.rb
create test/unit/place_test.rb
create test/fixtures/places.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (Place)
the DB is up and running, and I can connect with the auth specified…
you need a places table
ruby script/generate model place
edit the ‘migration’ file and put in the columns
You can’t scaffold fields from tables that don’t exist
Craig
I had updated my database.yml to
development:
adapter: postgresql
database: dbname
username: postgres
password: *********
host:
port: 5432
I’m still having the same problem 
thanks,
bing
I’m having the same error here…
ruby script/generate scaffold Place PlaceControl
exists app/controllers/
exists app/helpers/
create app/views/place_control
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/place.rb
create test/unit/place_test.rb
create test/fixtures/places.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (Place)
the DB is up and running, and I can connect with the auth specified…
–
“The only thing necessary for the triumph of evil
is for good men to do nothing”
Edmund Burke
On 6/28/06, Bing T. [email protected] wrote:
Hi guys,
I’ve been able to successfully install the postgres adapter for a remote
database machine to get rails up. My machine is running on Fedora 2.
Rails version 1.1.2. Is my yml config correct? I am getting this error
when I execute script/generate scaffold service_contents content :
error Before updating scaffolding from new DB schema, try
creating a table for your model (ServiceContents)
The error message says that you need to create a table for your model.
So do that:
./script/generate migration AddServiceContents
and then put a create_table statement in the migration.
Pat