views:

51

answers:

3

I'm new to rails and was trying out the scaffold command - the following scaffold runs and works when I view it via web brick

script/generate scaffold book title:string

the following fails - gives me a weird route error

script/generate scaffold application name:string

the following works

script/generate scaffold app name:string

can anyone shed some light on this? Is 'application' a reserved word?

+2  A: 

Yes Application is a reserved word

You can see a complete list on the Wiki

http://wiki.rubyonrails.org/rails/pages/reservedwords

shingara
+2  A: 

All your controllers are subclasses of ApplicationController, created by Rails. you can't create another controller with this name.

pablorc
A: 

Just so you know, make sure not to do this:

script/generate book title:string

You need to have the word scaffold after generate, like this:

script/generate scaffold book title:string
fixed - good catch
palecoder