Forum: Ruby on Rails Problems with simple scaffold code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lorenzo B. (Guest)
on 2006-01-26 16:17
(Received via mailing list)
Hi all,

I had scaffold generate some code on a brand new app the trace is here:

http://rafb.net/paste/results/H87GHC68.html

Could you point me to what problem needs to be fixed please as i've been
banging my head against this for some time now?

The table is very simple and its called "user" with id, email, password
fields. I've set pluralize_table_names to false and set_table_name
'user'. That's all i tweaked the rest is all scaffold's fault ;-)

Ah yeah, my stack is winxp, ruby 1.8.2, rails 1.0, webrick, postgresql
8.1

The connection with the db certainly works otherwise generate/scaffold
would have generated an error.

Any thoughts?

Lorenzo
Lugovoi N. (Guest)
on 2006-01-26 16:23
(Received via mailing list)
"user" is reserved PostgreSQL keyword. Rename the table.
I'd suggest never use table names which clash with reserved keywords.

2006/1/26, Lorenzo B. <removed_email_address@domain.invalid>:
Mikkel B. (Guest)
on 2006-01-26 16:24
> Ah yeah, my stack is winxp, ruby 1.8.2, rails 1.0, webrick, postgresql
> 8.1

 I just read that user is a reserved keyword in postgresql...try
renaming your table...

This is secondhand info...

Mikkel
Lorenzo B. (Guest)
on 2006-01-26 23:26
(Received via mailing list)
Lugovoi N. wrote:
> "user" is reserved PostgreSQL keyword. Rename the table.
> I'd suggest never use table names which clash with reserved keywords.

Tnx guys! That fixed the problem!

Lorenzo
This topic is locked and can not be replied to.