# Pluralizations

**URL:** <https://www.ruby-forum.com/t/pluralizations/94826>\
**Category:** Rails\
**Created:** [January 9, 2006, 5:23pm UTC](https://www.ruby-forum.com/t/pluralizations/94826 "2006-01-09T17:23:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Wright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@Christopher\_Wright](https://www.ruby-forum.com/u/Christopher_Wright)\
**Post date:** [January 9, 2006, 5:23pm UTC](https://www.ruby-forum.com/t/pluralizations/94826/1 "2006-01-09T17:23:54Z")

</div>

Hi, I’m new to Ruby and Rails, and I’m running Ruby 1.8.4 with Rails 1.0  
on Ubuntu 5.10 (breezy).

I wanted to have a model Software, with the table as software (since  
‘software’ is the plural too). I appreciate one can simply use something  
like use\_table or whatever (can’t remember the exact command) in the  
Model file, but I’d much rather change the inflections.rb file and  
update Rails to use the proper pluralization.

I found _an_ inflections.rb file in: (not sure if there’s another  
inflections file somewhere else which I should edit)

/usr/lib/ruby/gems/activesupport-1.2.5/lib/active\_support/

and I changed the line:  
inflect.uncountable %w( equipment information rice money species series  
fish sheep)

to:  
inflect.uncountable %w( equipment information rice money species series  
fish sheep software)

and nothing happened (I tried \<%= “Software”.pluralize %\> in a Rails  
app) so I restarted apache2, and still nothing happened.

I restarted my computer (just in case I had to restart something which I  
didn’t know about), and still comes up as ‘software’.

So…is there anything I need to do to get Rails to use the updated  
file, or am I editing the wrong file?

---

<div class="post-metadata">

**Author:** ![Christopher\_Wright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@Christopher\_Wright](https://www.ruby-forum.com/u/Christopher_Wright)\
**Post date:** [January 9, 2006, 5:57pm UTC](https://www.ruby-forum.com/t/pluralizations/94826/2 "2006-01-09T17:57:15Z")

</div>

I found out from a helpful guy on the rails IRC.

In case someone else read this and also wondered how, you have to edit  
the environment.rb file. This doesn’t update Rails, so it’s app  
specific, not quite what I wanted but good enough.

---

<div class="post-metadata">

**Author:** ![Christopher\_Wright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@Christopher\_Wright](https://www.ruby-forum.com/u/Christopher_Wright)\
**Post date:** [January 9, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/pluralizations/94826/3 "2006-01-09T18:40:54Z")

</div>

Instead of updating Rails source files, I’d make this change in your  
application’s environment. In your environment.rb file, add the  
following:

Inflector.inflections do |inflect|  
inflect.uncountable ‘software’  
end

That will do what you need, and won’t require you to mess with Rails  
files  
whenever you update Rails or move your app to a different server.

Gabe
