0

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)

4
  • 2
    Did you run rake db:create:all to create your new Postgres databases? Commented Sep 15, 2012 at 10:39
  • just now discovered a new tutorial which was saying that... Thanks a bunch that was the only problem :< Commented Sep 15, 2012 at 11:22
  • You're welcome. I'll put that as the answer to close out this question. Commented Sep 15, 2012 at 11:54
  • Thanks again. Since rails comunity ain't really vaste i appreciate when I get an useful answere :) Commented Sep 15, 2012 at 12:09

1 Answer 1

1

You need to run rake db:create:all to create your new Postgres databases.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.