Reputation: 2181
I'm looking forward to change the develeop and prodoction databses in order to be able to migrate to heroku.
I fallowed this link step by step everything went ok, I restarted the server rails s
while my postgresql was started and I got this error
ActiveRecord::StatementInvalid in Tasks#main
Showing /home/bogdan/ex/bored/app/views/tasks/_rand_task.html.erb where line #3 raised:
PG::Error: ERROR: relation "tasks" does not exist
LINE 4: WHERE a.attrelid = '"tasks"'::regclass
^
: 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 = '"tasks"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Since that is the first call of an object, I'm wandering shouyld i migrate or do anyhting else in order to get my pg
working (sorry if the question is dummiesh)
Upvotes: 0
Views: 44
Reputation: 16793
You need to run rake db:create:all
to create your new Postgres databases.
Upvotes: 1