Earlier this week, I posted a question about scaffold causing an
unitialized constant. As no one seemed to have any information, I
started coding without the scaffolding. I''m now getting the error
again.
In my controller, I started with the following line of code in a list
type method:
@quotes = Quotes.find :all
This works fine. As there are many quotes in the database, however, I
replaced it with the following line:
@quote_pages, @quotes = paginate(:quotes, :order => "author")
This was the *ONLY* change. Immediately, my error came back. For those
that didn''t see the original post, here''s the error that is
returned:
-------------------------------------------------------------
uninitialized constant Quote
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:194:in
`paginator_and_collection_for''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:129:in
`paginate''
app/controllers/admin_controller.rb:6:in `quotes''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:194:in
`paginator_and_collection_for''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:129:in
`paginate''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in
`send''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in
`perform_action_without_filters''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue''
/usr//lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in
`perform_action''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in
`send''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in
`process_without_filters''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in
`process_without_session_management_support''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in
`process''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:115:in
`handle_dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:81:in
`service''
/usr//lib/ruby/1.8/webrick/httpserver.rb:104:in `service''
/usr//lib/ruby/1.8/webrick/httpserver.rb:65:in `run''
/usr//lib/ruby/1.8/webrick/server.rb:173:in `start_thread''
/usr//lib/ruby/1.8/webrick/server.rb:162:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:162:in `start_thread''
/usr//lib/ruby/1.8/webrick/server.rb:95:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:92:in `each''
/usr//lib/ruby/1.8/webrick/server.rb:92:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:23:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:82:in `start''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:67:in
`dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/servers/webrick.rb:59
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:30
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require''
script/server:3
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in
`constantize''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:194:in
`paginator_and_collection_for''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:129:in
`paginate''
app/controllers/admin_controller.rb:6:in `quotes''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in
`send''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in
`perform_action_without_filters''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue''
/usr//lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in
`perform_action''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in
`send''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in
`process_without_filters''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in
`process_without_session_management_support''
/usr//lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in
`process''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:115:in
`handle_dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:81:in
`service''
/usr//lib/ruby/1.8/webrick/httpserver.rb:104:in `service''
/usr//lib/ruby/1.8/webrick/httpserver.rb:65:in `run''
/usr//lib/ruby/1.8/webrick/server.rb:173:in `start_thread''
/usr//lib/ruby/1.8/webrick/server.rb:162:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:162:in `start_thread''
/usr//lib/ruby/1.8/webrick/server.rb:95:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:92:in `each''
/usr//lib/ruby/1.8/webrick/server.rb:92:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:23:in `start''
/usr//lib/ruby/1.8/webrick/server.rb:82:in `start''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:67:in
`dispatch''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/servers/webrick.rb:59
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require''
/usr//lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:30
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require''
/usr//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require''
script/server:3
This error occured while loading the following files:
quote.rb
----------------------------------------------------------------------
I haven''t a clue what might be wrong. Can anybody suggest something for
me?
Thanks in advance
---Michael
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---