# Strange scaffolding bug for Rails 2.3.2

**URL:** <https://www.ruby-forum.com/t/strange-scaffolding-bug-for-rails-2-3-2/169890>\
**Category:** Rails\
**Created:** [June 10, 2009, 12:54am UTC](https://www.ruby-forum.com/t/strange-scaffolding-bug-for-rails-2-3-2/169890 "2009-06-10T00:54:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThomasJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6f9a4e/32.png) [@ThomasJ](https://www.ruby-forum.com/u/ThomasJ)\
**Post date:** [June 10, 2009, 12:54am UTC](https://www.ruby-forum.com/t/strange-scaffolding-bug-for-rails-2-3-2/169890/1 "2009-06-10T00:54:54Z")

</div>

Hello!

This is my first post, so plz be patient 🙂  
I discovered a strange bug in Rails 2.3.2:  
Tested with various DB-Configs (SQLite 3 & MySQL)

Just create a new & fresh rails app and generate a scaffold like this:

ruby script/generate scaffold koerperpartie name:string

and run rake db:migrate and rake:test

–\> there seems to be a problem with “koerperpartie\_path”

I can reproduce this error on others systems too.

btw “koerperpartie” means “bodypart” 😉

greetz

thomas jansing

---

<div class="post-metadata">

**Author:** ![ThomasJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6f9a4e/32.png) [@ThomasJ](https://www.ruby-forum.com/u/ThomasJ)\
**Post date:** [June 10, 2009, 1:04am UTC](https://www.ruby-forum.com/t/strange-scaffolding-bug-for-rails-2-3-2/169890/2 "2009-06-10T01:04:51Z")

</div>

On Jun 9, 11:08 pm, ThomasJ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and run rake db:migrate and rake:test
> 
> → there seems to be a problem with “koerperpartie\_path”

I’m guessing at what the problem is since I haven’t tried this (tip  
for next time: describe exactly what it is that didn’t work), but my  
money would be on rails incorrectly pluralizing/singularizing your non  
english model name.

Fred

---

<div class="post-metadata">

**Author:** ![ThomasJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6f9a4e/32.png) [@ThomasJ](https://www.ruby-forum.com/u/ThomasJ)\
**Post date:** [June 10, 2009, 2:05am UTC](https://www.ruby-forum.com/t/strange-scaffolding-bug-for-rails-2-3-2/169890/3 "2009-06-10T02:05:41Z")

</div>

You got that right (of course) Fred

“rake routes”

koerperparties GET /koerperparties(.:format)  
{:action=\>“index”, :controller=\>“koerperparties”}  
POST /koerperparties(.:format)  
{:action=\>“create”, :controller=\>“koerperparties”}  
new\_koerperparty GET /koerperparties/new(.:format)  
{:action=\>“new”, :controller=\>“koerperparties”}  
edit\_koerperparty GET /koerperparties/:id/edit(.:format)  
{:action=\>“edit”, :controller=\>“koerperparties”}  
koerperparty GET /koerperparties/:id(.:format)  
{:action=\>“show”, :controller=\>“koerperparties”}  
PUT /koerperparties/:id(.:format)  
{:action=\>“update”, :controller=\>“koerperparties”}  
DELETE /koerperparties/:id(.:format)  
{:action=\>“destroy”, :controller=\>“koerperparties”}  
/:controller/:action/:id  
/:controller/:action/:id(.:format)

Before issuing the “script/generate scaffold…” command add this to  
“config/initializers/inflections.rb”:

ActiveSupport::Inflector.inflections do |inflect|  
inflect.irregular ‘koerperpartie’, ‘koerperparties’ # or whatever  
the plural really is  
end

Then “script/generate scaffold…” and the following “rake  
db:migrate”, “rake test” will make you smile…

On Jun 9, 6:27 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
