Table called applications - causes stack overflow?


#1

Having worked through Four Days on Rails and the book Agile Web
Development
with Rails I decided it was time to start a live project. I have an
existing
application with MySQL database, so I modified the schema to use Rails
standard column names. The main table was named ‘applications’.

ruby script/generate scaffold Application Admin results a stack overflow

SystemStackError in Admin#Index
stack level too deep

Is there a list of table names somewhere which are not permitted please,
or is
Application a ?

Chris Sendall
University of Cambridge, UK

rails -v
Rails 0.14.4

Part of stack trace from web page
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:178:in require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies. rb:178:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:134:in load_file!' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies. rb:97:inconst_load!’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:80:in each' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies. rb:80:inconst_load!’

/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:72:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies. rb:189:inconst_get’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:189:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri ng/../../inflector.rb:149:inmodule_eval’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri
ng/…/…/inflector.rb:149:in module_eval' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri ng/../../inflector.rb:149:inconstantize’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri
ng/inflections.rb:52:in constantize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/pagination.r b:186:inpaginator_and_collection_for’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/pagination.r
b:124:in paginate' #{RAILS_ROOT}/app/controllers/admin_controller.rb:8:inlist’
#{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index’


#2

Am Mittwoch, den 21.12.2005, 09:48 +0000 schrieb Chris Sendall:

Is there a list of table names somewhere which are not permitted please, or is
Application a ?

Have a look here:
http://wiki.rubyonrails.com/rails/pages/ReservedWords

‘Application’ is not listed, but should probably be added.