Pluralization of tables lost in a hosting environment

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

#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?


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

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

Thanks Chris.

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs