Why does User.count return 0, until bin/spring is restarted in Ruby on Rails?

65 Views Asked by At

I run bundle exec rails c,

It goes to development environment.

When I do User.count I get 0 records.

  1. But after I do bin/spring stop and then bin/spring start, I see User.count records as 23782. Why is it so?
  2. What does spring do here?
  3. What are its role and responsibilities?
  4. Should I do this everytime?
  5. Is this Spring same as Java Spring?
0

There are 0 best solutions below