Note that there are some explanatory texts on larger screens.

plurals
  1. PORails app, installing Devise, rake db:migrate error
    text
    copied!<p>Trying to re-install Devise. Rails 4 on Postgresql</p> <p>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</p> <p>Then ran</p> <p><code>rails generate devise User</code></p> <p>and got this...</p> <pre><code>invoke active_record create db/migrate/20130819025615_add_devise_to_users.rb insert app/models/user.rb route devise_for :users </code></pre> <p>but the problem is when I try and run <code>rake db:migrate</code> I get this error</p> <p><code>== 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' </code></p> <p>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?</p> <p>Also, why didnt Devise create this? Will this cause future problems?</p> <p>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)</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload