All, I am trying to wire my RAILS app to my database and when I run I get the follwing error: I have attached .rb files for your review. I was able to this to work with a simple table name [ruby_test], but the minute I move to my real one [interior_selections] I get the above error. I am running on Windows 2000 with SQL Server. Thanks again! Ron NameError in Interior_selections#list uninitialized constant InteriorSelection script/server:49 Show framework trace <http://127.0.0.1:3000/InteriorSelections/list#> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in `const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `const_get' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `each' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/inflections.rb:44:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:169:in `paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:111:in `paginate' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:101:in `list' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71: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-0.13.1/lib/webrick_server.rb:57:in `dispatch' This error occured while loading the following files: interior_selection.rb Request Parameters: None Show session dump <http://127.0.0.1:3000/InteriorSelections/list#> --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Just an interesting variation was I went singular on the name and [interior_selection] and forcing the table name like the following: class InteriorSelections < ActiveRecord::Base def self.table_name() "interior_selections" end set_primary_key "selection_id" end or class InteriorSelections < ActiveRecord::Base set_primary_key "selection_id" def self.table_name() "interior_selections" end end This is what I go ActiveRecord::StatementInvalid in Interior_selection#index Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server Line 1: Incorrect syntax near '*'. HRESULT error code:0x80020009 Exception occurred.: SELECT * FROM ( SELECT TOP 10 * FROM ( SELECT TOP 10 * FROM interior_SELECT * FROM ( SELECT TOP 10 * FROM ( SELECT TOP 10ions ) AS tmp1 ORDER BY id DESC ) AS tmp2 ORDER BY id ASC script/server:49 Show framework trace <http://127.0.0.1:3000/InteriorSelection#> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/abstract_adapter.rb:462:in `log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/sqlserver_adapter.rb:330:in `select' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/sqlserver_adapter.rb:186:in `select_all' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:376:in `find_by_sql' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:343:in `find' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/deprecated_finders.rb:37:in `find_all' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:161:in `find_collection_for_pagination' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:175:in `paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:111:in `paginate' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:101:in `list' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:94:in `index' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71: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-0.13.1/lib/webrick_server.rb:57:in `dispatch' Request Parameters: None Show session dump <http://127.0.0.1:3000/InteriorSelection#> --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} -----Original Message----- From: Ron DiFrango on behalf of Ron DiFrango Sent: Fri 8/12/2005 2:20 AM To: rails@lists.rubyonrails.org Cc: Subject: Another newbie one.... All, I am trying to wire my RAILS app to my database and when I run I get the follwing error: I have attached .rb files for your review. I was able to this to work with a simple table name [ruby_test], but the minute I move to my real one [interior_selections] I get the above error. I am running on Windows 2000 with SQL Server. Thanks again! Ron NameError in Interior_selections#list uninitialized constant InteriorSelection script/server:49 Show framework trace <http://127.0.0.1:3000/InteriorSelections/list#> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in `const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `const_get' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `each' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/inflections.rb:44:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:169:in `paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:111:in `paginate' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:101:in `list' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71: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-0.13.1/lib/webrick_server.rb:57:in `dispatch' This error occured while loading the following files: interior_selection.rb Request Parameters: None Show session dump <http://127.0.0.1:3000/InteriorSelections/list#> --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Further tests with the same result: class InteriorSelection < ActiveRecord::Base def self.table_name() "interior_selections" end def self.primary_key() "selection_id" end end -----Original Message----- From: Ron DiFrango Sent: Fri 8/12/2005 2:30 AM To: rails@lists.rubyonrails.org; rails@lists.rubyonrails.org Cc: Subject: [Rails] RE: Another newbie one.... Just an interesting variation was I went singular on the name and [interior_selection] and forcing the table name like the following: class InteriorSelections < ActiveRecord::Base def self.table_name() "interior_selections" end set_primary_key "selection_id" end or class InteriorSelections < ActiveRecord::Base set_primary_key "selection_id" def self.table_name() "interior_selections" end end This is what I go ActiveRecord::StatementInvalid in Interior_selection#index Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server Line 1: Incorrect syntax near '*'. HRESULT error code:0x80020009 Exception occurred.: SELECT * FROM ( SELECT TOP 10 * FROM ( SELECT TOP 10 * FROM interior_SELECT * FROM ( SELECT TOP 10 * FROM ( SELECT TOP 10ions ) AS tmp1 ORDER BY id DESC ) AS tmp2 ORDER BY id ASC script/server:49 Show framework trace <http://127.0.0.1:3000/InteriorSelection#> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/abstract_adapter.rb:462:in `log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/sqlserver_adapter.rb:330:in `select' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/sqlserver_adapter.rb:186:in `select_all' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:376:in `find_by_sql' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:343:in `find' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/deprecated_finders.rb:37:in `find_all' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:161:in `find_collection_for_pagination' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:175:in `paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:111:in `paginate' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:101:in `list' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:94:in `index' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71: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-0.13.1/lib/webrick_server.rb:57:in `dispatch' Request Parameters: None Show session dump <http://127.0.0.1:3000/InteriorSelection#> --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} -----Original Message----- From: Ron DiFrango on behalf of Ron DiFrango Sent: Fri 8/12/2005 2:20 AM To: rails@lists.rubyonrails.org Cc: Subject: Another newbie one.... All, I am trying to wire my RAILS app to my database and when I run I get the follwing error: I have attached .rb files for your review. I was able to this to work with a simple table name [ruby_test], but the minute I move to my real one [interior_selections] I get the above error. I am running on Windows 2000 with SQL Server. Thanks again! Ron NameError in Interior_selections#list uninitialized constant InteriorSelection script/server:49 Show framework trace <http://127.0.0.1:3000/InteriorSelections/list#> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in `const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `const_get' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:59:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `each' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `inject' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/../../inflector.rb:58:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/core_ext/string/inflections.rb:44:in `constantize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:169:in `paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/pagination.rb:111:in `paginate' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:101:in `list' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71: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-0.13.1/lib/webrick_server.rb:57:in `dispatch' This error occured while loading the following files: interior_selection.rb Request Parameters: None Show session dump <http://127.0.0.1:3000/InteriorSelections/list#> --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ron DiFrango wrote:>Further tests with the same result: > >class InteriorSelection < ActiveRecord::Base > def self.table_name() > "interior_selections" > end > > def self.primary_key() > "selection_id" > end >end > >rather than overriding the table_name() and primary_key() methods try: class InteriorSelection < ActiveRecord::Base set_table_name "interior_selections" set_primary_key "selection_id" end see: http://ar.rubyonrails.com/classes/ActiveRecord/Base.html#M000277