Bill Edstrom, Jr.
2006-Jun-14 19:44 UTC
[Rails] uninitialized constant error after scaffold on new Windows XP environment
I am attempting to get a working Rails programming environment setup working under XP with MySQL, RadRails and Webrick. I have been using my PowerBook but need to working on Windows environment too. I have basic functions of Ruby and Rails going. I created a really simple table and generated the scaffolding. The server starts just fine. I can browse the database succesfully in RadRails. The issue is this error when I attempt to run the program. I have been looking at this for several hours now and am running out of ideas. (1) Do you recognize this error and have any suggestions. I am running a completely vanilla scaffold. (2) My MySQL table has just two colums one is an interger and one is a medium text field. Are there some MySQL datatypes that are not compatible with Rails? Thanks! =================================== uninitialized constant Slip RAILS_ROOT: ./script/../config/.. Application Trace <http://localhost:3000/admin#> | Framework Trace<http://localhost:3000/admin#>| Full Trace <http://localhost:3000/admin#> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' -e:4:in `load'' -e:4 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' script/server:3 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' script/server:3 -e:4:in `load'' -e:4 This error occured while loading the following files: slip.rb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060614/09798c2b/attachment-0001.html
Brian Hogan
2006-Jun-14 19:55 UTC
[Rails] uninitialized constant error after scaffold on new Windows XP environment
When you see that message, it usually means your model couldn''t be loaded due to syntax problems or something of that nature. Notice the message at the end of the stack trace... This error occured while loading the following files: slip.rb Have a look in your model for any syntax issues. If you''re stuck, paste the code and I''m sure someone can help. This doesn''t *seem* like a Windows issue to me. On 6/14/06, Bill Edstrom, Jr. <w.edstrom@gmail.com> wrote:> > I am attempting to get a working Rails programming environment setup > working under XP with MySQL, RadRails and Webrick. I have been using my > PowerBook but need to working on Windows environment too. > > I have basic functions of Ruby and Rails going. I created a really simple > table and generated the scaffolding. The server starts just fine. I can > browse the database succesfully in RadRails. The issue is this error when I > attempt to run the program. > > I have been looking at this for several hours now and am running out of > ideas. > > (1) Do you recognize this error and have any suggestions. I am running a > completely vanilla scaffold. > > (2) My MySQL table has just two colums one is an interger and one is a > medium text field. Are there some MySQL datatypes that are not compatible > with Rails? > > Thanks! > > > > > > ===================================> > > uninitialized constant Slip > > RAILS_ROOT: ./script/../config/.. > Application Trace <http://localhost:3000/admin#> | Framework Trace<http://localhost:3000/admin#>| Full > Trace <http://localhost:3000/admin#> > > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' > #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' > #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' > -e:4:in `load'' > -e:4 > > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' > script/server:3 > > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' > #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' > #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' > script/server:3 > -e:4:in `load'' > -e:4 > > This error occured while loading the following files: > slip.rb > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060614/c6c5ebca/attachment-0001.html
Bill Edstrom, Jr.
2006-Jun-14 20:11 UTC
[Rails] uninitialized constant error after scaffold on new Windows XP environment
> > When you see that message, it usually means your model couldn''t be loaded > due to syntax problems or something of that nature. >Thanks for the quick response. Is the something wrong with naming the model "Slips" My model is simply scaffold code: class Slips < ActiveRecord::Base end The controller is scaffold as well: class AdminController < ApplicationController def index list render :action => ''list'' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], :redirect_to => { :action => :list } def list @slips_pages, @slips = paginate :slips, :per_page => 10 end def show @slips = Slips.find(params[:id]) end def new @slips = Slips.new end def create @slips = Slips.new(params[:slips]) if @slips.save flash[:notice] = ''Slips was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end end def edit @slips = Slips.find(params[:id]) end def update @slips = Slips.find(params[:id]) if @slips.update_attributes(params[:slips]) flash[:notice] = ''Slips was successfully updated.'' redirect_to :action => ''show'', :id => @slips else render :action => ''edit'' end end def destroy Slips.find(params[:id]).destroy redirect_to :action => ''list'' end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060614/6ed34443/attachment-0001.html
Alan Francis
2006-Jun-14 20:29 UTC
[Rails] Re: uninitialized constant error after scaffold on new Windo
Bill Edstrom, Jr. wrote:>> >> When you see that message, it usually means your model couldn''t be loaded >> due to syntax problems or something of that nature. >> > > > Thanks for the quick response. Is the something wrong with naming the > model > "Slips"Kind of :-) Rails convention is singular classname and plural tablename. The DB table would be called ''slips'', the model class should be called Slip. Alan -- Posted via http://www.ruby-forum.com/.
Bill Edstrom, Jr.
2006-Jun-14 21:26 UTC
[Rails] Re: uninitialized constant error after scaffold on new Windo
> > Thanks for the quick response. Is the something wrong with naming the > > model > > "Slips" > > Kind of :-) > > Rails convention is singular classname and plural tablename. The DB > table would be called ''slips'', the model class should be called Slip.Very basic mistake on my part! Thank you so much, this solved my problem, I am Rolling on Windows! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060614/37cb259c/attachment.html
Bill Walton
2006-Jun-15 03:51 UTC
[Rails] uninitialized constant error after scaffold on newWindows XP environment
Bill Edstrom, Jr. wrote:> Is the something wrong with naming the model "Slips"Yes. One of the fundamental RoR conventions is that table names are plurals of the model names. That''s because, in the AR pattern, models are an instance (singular) of a collection of objects (plural) that are stored in tables. So if you have a ''slip'' object (model) it will be stored in a table named ''slips''. Convention over configuration. Makes sense, no? hth, Bill