Known bug in 0.12.1, is fixed in CVS and will be in next release.
http://dev.rubyonrails.com/ticket/1404
On 7/1/05, Corey Lawson
<corey.ssf.lawson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''ve got an ''addresses'' table: id, type,
address1, address2, etc.
>
> I''ve got a model: address.rb
>
> model Address < ActiveRecord::Base
> end
>
> I made the scaffold (ruby script/generate scaffold address).
>
> When I try to look at it in the browser after starting it up (ruby
> script/server)
> via http://localhost:3000/addresses/
>
> ...I get this error:
>
> uninitialized constant Addres
>
> app/controllers/addresses_controller.rb:8:in `list''
> app/controllers/addresses_controller.rb:3:in `index''
> script/server:48
>
> Show framework trace
>
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:183:in
> `const_missing''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:53:in
> `const_get''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:53:in
> `constantize''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:52:in
> `inject''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:52:in
> `each''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:52:in
> `inject''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:52:in
> `constantize''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/inflections.rb:44:in
> `constantize''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/pagination.rb:172:in
> `paginator_and_collection_for''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/pagination.rb:111:in
> `paginate''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/base.rb:708:in
> `send''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/base.rb:708:in
> `perform_action_without_filters''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/filters.rb:294:in
> `perform_action_without_benchmark''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/benchmarking.rb:37:in
> `perform_action_without_rescue''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/benchmarking.rb:37:in
> `measure''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/benchmarking.rb:37:in
> `perform_action_without_rescue''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/rescue.rb:79:in
> `perform_action''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/base.rb:330:in
> `send''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/base.rb:330:in
> `process''
>
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/base.rb:273:in
> `process''
> d:/ruby/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/dispatcher.rb:32:in
`dispatch''
> D:/src/railsdev/public/dispatch.rb:10
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in
> `load''
>
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in
> `load''
> d:/ruby/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:82:in
> `handle_dispatch''
> d:/ruby/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:35:in
> `service''
> d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''
> d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
> d:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
> d:/ruby/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:21:in
> `dispatch''
>
> This error occured while loading the following files:
> addres.rb
>
> Is the order of substitutions wrong in the method that seems to do
> this? Is it trying to depluralize it twice?
>
> Thanks.
>
> -Corey Lawson
> "I named my boy Sue"
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Chris Johnson
cj-lHH7W0eyjmpWk0Htik3J/w@public.gmane.org