try this: bundle exec rake db:drop db:create db:migrate db:test:prepare
Att, [image: --] Antonio Augusto [image: http://]about.me/aaugusto <http://about.me/aaugusto?promo=email_sig> <https://www.facebook.com/augustobr> <https://twitter.com/xtrdev> <http://br.linkedin.com/in/antoniobr/> <https://github.com/antoniosb> [image: http://about.me/aaugusto] <http://about.me/aaugusto> <https://plus.google.com/u/0/111953897116031502239/> 2015-01-29 14:51 GMT-02:00 Sean Kelley <kelleyf...@gmail.com>: > I updated to rails 4.2 from 4.1 recently. Not sure if that fact is > related to my problem or not. I have not run any tests since before > update. Now attempting to run a controller test give me the error: > 'migrations are pending' with recommendation to run: bin/rake db:migrate > RAILS_ENV=test > > when I run migrate on test I get error: > PGDuplicateTable relation 'users' already exists > > If I run migration on production I do not get error. If I run the > following: > bundle exec rake db:migrate:reset RAILS_ENV=test > I can then run the test once, but trying to re-run gives me the migration > pending error again. > > Incidentally, my first project migration in migrations directory creates > users table: > class DeviseCreateUsers < ActiveRecord::Migration > def change > create_table(:users) do |t| > ... > > This is my first rails app so I am wondering what is causing this and how > to resolve. Any ideas? > > background: I am developing on windows 7 with rspec testing and Postgres > database if any of that matters. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/c1324137-ecb6-4a92-802f-833ac0d32528%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/c1324137-ecb6-4a92-802f-833ac0d32528%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAK6FffLAXmYZoW57Ur1155OnQBTS2eCrsWFMNyktNzKFA89EWg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.