# Newbie: NameError in my first Scaffold generation

**URL:** <https://www.ruby-forum.com/t/newbie-nameerror-in-my-first-scaffold-generation/111284>\
**Category:** Rails\
**Created:** [August 5, 2007, 12:43am UTC](https://www.ruby-forum.com/t/newbie-nameerror-in-my-first-scaffold-generation/111284 "2007-08-05T00:43:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jules](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@jules](https://www.ruby-forum.com/u/jules)\
**Post date:** [August 5, 2007, 12:43am UTC](https://www.ruby-forum.com/t/newbie-nameerror-in-my-first-scaffold-generation/111284/1 "2007-08-05T00:43:08Z")

</div>

Hello

I have a MySQL Table named: sorties  
I have generated RAILS code using: generate scaffold Sortie Admin  
It succesfully geneates the code sorti.rb, with Sortie \<  
ActiveRecord::Base and admin\_controller.rb with references to @sortie  
and Sortie.find etc

But when I try to browse to [http://localhost:3000/admin/list](http://localhost:3000/admin/list) I get:  
“uninitialized constant Sorty” error, and its trying to load sorty.rb

Burried deep down the trace there is:  
ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/  
dependencies.rb:123:in `const\_missing’

It would appear that RAILS is trying to singlerise ‘sorties’, to  
‘sorty’, instead of ‘sortie’  
I cannot find use of sorty constant anywhere in my code, so I am  
confused how to make the correction.

Any Help would be appreciated

---

<div class="post-metadata">

**Author:** ![jules](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@jules](https://www.ruby-forum.com/u/jules)\
**Post date:** [August 5, 2007, 1:01am UTC](https://www.ruby-forum.com/t/newbie-nameerror-in-my-first-scaffold-generation/111284/2 "2007-08-05T01:01:09Z")

</div>

Jules wrote:

> Any Help would be appreciated  
> Open up config/environment.rb and scroll down to the bottom to the  
> Inflector section.

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![jules](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@jules](https://www.ruby-forum.com/u/jules)\
**Post date:** [August 5, 2007, 1:26am UTC](https://www.ruby-forum.com/t/newbie-nameerror-in-my-first-scaffold-generation/111284/3 "2007-08-05T01:26:11Z")

</div>

Cheers

I added the folling, which now seems to make my applicaiton work.

Inflector.inflections do |inflection| inflection.irregular “sortie”,  
“sorties”  
end
