0

I updated my database.yml file to look like so:

test:
  adapter: postgresql
  encoding: unicode
  database: startpoint_test
  hostname: localhost
  pool: 5
  username: postgres
  password: password

development:
  adapter: postgresql
  encoding: unicode
  database: startpoint_dev
  pool: 5
  username: postgres
  password: password

And now it seems when I run my application, and sign up a new user the development database does not get a new user inserted into it ...

The tests all pass for signing up a new user

Adam
  • 609
  • 2
  • 8
  • 15
  • Did you change the name of either database? – Zach Kemp Sep 27 '13 at 03:51
  • both of them say startpoint_dev. Test works for obvious testing, theres no issue there .... if their is factory girl ins't telling me about when she create user objects and saves them to the database. and rake db:migrate works on both .... – Adam Sep 27 '13 at 04:13
  • For a number of reasons, it's not really a good idea to use the same db for both environments. Do you have anything like DatabaseCleaner running in your tests? When you say 'signing up a new user', do you mean through the web site or through the rails console? Since you mentioned FactoryGirl, I assume that for testing you're just creating the user directly. – Zach Kemp Sep 27 '13 at 04:25
  • I am using two seperate databases, as you can see, startpoint_test for tests and startpoint_dev for development – Adam Sep 27 '13 at 04:29
  • Sorry, I guess I was confused by your previous comment. Anyway, if you can post more details (controller code, passing tests, relevant server logs) we might be able to help, but as is, your question may be unanswerable. – Zach Kemp Sep 27 '13 at 04:32

1 Answers1

0

Have you tried using

rake db:create:all

and then

rake db:test:prepare
r3b00t
  • 6,953
  • 6
  • 27
  • 37
  • currently test database is working as expected, all tests are running fine, but now my development database wont allow me to insert new entries. it doesn't spazz out, when I navigate to my app in the browser and try to sign up the sign up works but their is no new user in the database ... but my tests for sign up all pass – Adam Sep 27 '13 at 04:26