I'm using rails to build an application which allows users to authorize and connect to the Twitter API using their Twitter account. The log in works, but i have a problem with the posts (i'm using this gem): when i try to run rails db:migrate i get this error:
$ rails db:migrate
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::DuplicateTable: ERROR: relation "tweets" already exists
: CREATE TABLE "tweets" ("id" serial primary key, "user_id" integer, "body" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
C:/Users/......./db/migrate/20170419185735_create_tweets.rb:3:in `change'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation "tweets" already exists
: CREATE TABLE "tweets" ("id" serial primary key, "user_id" integer, "body" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
C:/Users/......./db/migrate/20170419185735_create_tweets.rb:3:in `change'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
PG::DuplicateTable: ERROR: relation "tweets" already exists
C:/Users/......./db/migrate/20170419185735_create_tweets.rb:3:in `change'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20170419185735 CreateTweets: migrating =====================================
-- create_table(:tweets)
I'm new to rails so any help would be appreciated!