I deployed an app that uses ActiveRecord to Heroku, and I got an internal server error. It works fine on my local machine (where the database is SQLite). Below is the log message for the error. The newsletters table is just a table with no associations. It's got just one field for email addresses. I don't know PostgreSQL, and I'm not sure what the problem is with this.
"ActiveRecord::StatementInvalid - PGError: ERROR: relation "newsletters" does not exist
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"newsletters"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
:
This is the code that gets called when the error appears.
post :index, :map => "/newsletter" do
email=params[:email]
@signup=Newsletter.new(:email=>email)
render "newsletter/index",:layout => false
end