1 thought on “What does the following command do? rake db:schema:load RAILS_ENV=test ?”

  1. Let’s break it down a bit

    1) RAILS_ENV=test

    This implies that whatever you do, it will affect the test environment – including the test database server.
    ie all database interactions are now with respect to the test database server.

    2) rake db:schema:load

    Loads the schema ( the database structure ) into the (test) database in one go.

    This is useful for quickly cloning the database structure used during development and testing against it when using integration tests etc.


Leave a Comment