Some projects that I try and learn from don't have a schema.rb file, why is that?
Can this be generated somehow?
Some projects that I try and learn from don't have a schema.rb file, why is that?
Can this be generated somehow?
sure, do the rake db:migrate (if you didn't make it already) and rake db:schema:dump.
I personally don't commit my schema.rb, that's because when you have more than one developer working on the same project, there is always merge problem, since this file change always.
check the .gitignore file and see if schema.rb is there, if you really want to push it to your repository, comment or remove this entry from your .gitignore
As VP said, rake db:migrate
will dump schema.rb after migrating. But if you just want to dump the schema:
rake db:schema:dump
Ignoring db/schema.rb is a contentious issue among developers. Personally, I don't have a problem ignoring it as it's caused issues for me in the past and I have no compelling reason to include it in version control.