Trying to re-install Devise. Rails 4 on Postgresql
I've followed the instructions from Devise (like adding devise gem/bundle install) and made the changes to my environments/application.rb/added my flash messages
Then ran
rails generate devise User
and got this...
invoke active_record
create db/migrate/20130819025615_add_devise_to_users.rb
insert app/models/user.rb
route devise_for :users
but the problem is when I try and run rake db:migrate
I get this error
== AddDeviseToUsers: migrating ===============================================
-- change_table(:users)
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "users" does not exist
: ALTER TABLE "users" ADD COLUMN "email" character varying(255) DEFAULT '' NOT NULL/Users/name/.rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in exec'
So I understand that the error is telling me that no table 'users' exists, but Devise is supposed to create this, so my main question is... What is the easiest way to fix this?
Also, why didnt Devise create this? Will this cause future problems?
Should I Create a Users table in postgres, and then run the command again in Devise and let it change necessary files and "devise-ify" it? (If it will even do that)
Thanks!