# Pluralization of tables lost in a hosting environment

**URL:** <https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865>\
**Category:** Rails\
**Created:** [October 12, 2006, 12:56am UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865 "2006-10-12T00:56:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 12, 2006, 12:56am UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865/1 "2006-10-12T00:56:28Z")

</div>

I am trying to deploy my Ruby on Rails application into textdrive.

I get MySql errors like these.

Mysql::Error: Table ‘session’ doesn’t exist: SHOW FIELDS FROM session

The problem is the table is called “sessions” and not “session”.

I see exactly the same problem with all the tables, somehow the table  
pluralization is lost.

I tried to set the tables to be plural in my environment.rb file like  
this:

#pluralize tables  
ActiveRecord::Base.pluralize\_table\_names = true

and restarted both rails and lighttpd, but it doesn’t help.

Any guidance of how to fix this?

anand

---

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 12, 2006, 3:23am UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865/2 "2006-10-12T03:23:41Z")

</div>

If you’re with textdrive, ask them! Their support is apparently  
awesome.  
As a quick fix, you could use:  
set\_table\_name ‘sessions’  
in your session.rb file.

---

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 17, 2006, 9:33am UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865/3 "2006-10-17T09:33:29Z")

</div>

Thats a real shame. I’ve only heard good about them.

---

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 17, 2006, 8:03am UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865/4 "2006-10-17T08:03:20Z")

</div>

Thanks Chris.

Textdrive help wasn’t of much help :(. I eventually got this to work  
by hard coding all the table names.

---

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 17, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/pluralization-of-tables-lost-in-a-hosting-environment/71865/5 "2006-10-17T19:57:56Z")

</div>

Yeah, they have been very helpful so far, but this thing stumped them.  
Not sure what is happening.
