PDA

View Full Version : Rails


Akaii
September 4th, 2005, 07:12 AM
Why is rails rejecting all my table names? It claims that they're all reserved words for rails. It might be believable for 'entries' or 'members', but i've even tried foreign words and random gibberish, and they're still not accepted.

What I've tried:

table name: members
ruby ./script/generate scaffold member

table name: memberships
ruby ./script/generate scaffold membership

table name: relationships
ruby ./script/generate scaffold relationship

table name: entries
ruby ./script/generate scaffold entry

table name: records
ruby ./script/generate scaffold record

table name: spoons
ruby ./script/generate scaffold spoon

table name: stuffs
ruby ./script/generate scaffold stuff

table name: kamaganaks
ruby ./script/generate scaffold kamaganak

table name: items
ruby ./script/generate scaffold item

table name: references
ruby ./script/generate scaffold reference

It always says that the name is reserved by ruby on rails, and that i should try again using another name. It even (annoyingly enough) displays a list of meanings and synonyms for the word.

rob
September 4th, 2005, 03:48 PM
That is very weird.

Is this on your local machine? If so, try reinstalling Ruby and all gems completely, and start again. It sounds like Rails (and maybe Ruby?) is corrupted.

Akaii
September 4th, 2005, 10:05 PM
I guess it isn't normal after all.

Yeah, just on my notebook. I'm hoping that Rails just got corrupted. I actually just reinstalled rails through gems, because we were having another problem with ./script/generate scaffold. The script would detect the table and make the controller, the model, and all the view files, but after running script/server, we couldn't access the list or show pages, though new and edit worked fine. The server kept generating "header errors".

rob
September 5th, 2005, 12:38 PM
Yea, make sure you're using the latest version of everything, including MySQL and Rails.

Definately use gems, they're the best way to install Rails.