, ,

$ rake db:schema:load RAILS_ENV={environment}
It will execute the script found in db/schema.rb.
environment can be: development, test, production e.g rake db:schema:load RAILS_ENV=development

$ rake db:seed
Execute seed data into your database.

$ rake db:migrate
Execute the migration scripts found in db/migrate.

rake db:reset RAILS_ENV={environment}
rake db:create RAILS_ENV={environment}
rake db:setup RAILS_ENV={environment}
rake db:create db:schema:load RAILS_ENV={environment}

Ways on how to run a rake test
For controller test: bundle exec rake spec:controllers
For model test: bundle exec rake spec:models
For all test: bundle exec rake spec
The issue with rake spec is that it is kinda slow. Its better to use rspec spec
To run a specific rspec file
bundle exec rspec spec/controllers_or_models/name_of_file.rb