Most weeks from here on start the same way and end the same way. This is the short version of both, plus how to reset the database and one settings fix for Windows. Keep it open the first few times; after that you will not need it.

Before Week 2: have a chat open

In Week 2 you ask an AI chat questions about a database and decide whether to believe its answers. Bring whichever one you already use: ChatGPT, Claude, Gemini, Copilot. Any of them is fine. There is nothing to install and nothing to sign up for. Have it open in a second window before class starts.

Getting started

  1. Use this template. On the class repository's page, click Use this template, then
    Create a new repository. Pick your own account as the owner, keep the name, and click
    Create repository. You now have your own copy; nothing you do can affect anyone else's.

  2. Create the Codespace. In your new repository: Code, then the Codespaces tab,
    then Create codespace on main. The first start takes a few minutes. Let it finish; the
    terminal at the bottom is ready when it shows a prompt and stops scrolling.

  3. Start the server. In the terminal:

    bin/rails server
    

    A box pops up offering to open the port. Click Open in Browser. If you miss the box, open the Ports tab next to the terminal and click the globe icon on port 3000.

The server keeps running in that terminal until you stop it with Ctrl-C. If you need a terminal for anything else, open a second one with the + on the terminal panel.

Coming back later. Do not create a second Codespace. Go to github.com/codespaces, or
Code > Codespaces on your repository, and open the one you already have. Your files are where you left them. The server is not; run bin/rails server again.

Windows: turn on right-click

On some Windows machines, right-clicking in the terminal does not open a menu, and the menu is how you find things like Clear. To fix it:

  1. Click the gear icon at the bottom left of the editor (the one inside the editor, not the one at the far left of your screen), then Settings. Not the command palette; the setting is not there.
  2. Search for right click behavior.
  3. Under Terminal > Integrated: Right Click Behavior, yours probably says copyPaste. Change it to selectWord.

It saves itself. Close the Settings tab and right-click in the terminal again. If you are on a Mac, you can skip this.

Resetting the database

In Week 2 the whole database is one file, db/baseball.sqlite3, and it is committed to the repository. So if anything damages it (a DELETE or UPDATE you did not mean, a table you dropped), you can put it back exactly as it was. In the terminal:

git checkout db/baseball.sqlite3

Then refresh the page. The rows are back. The server can keep running while you do it.

This works as long as you have not committed the damage. If db/baseball.sqlite3 ever shows up under Changes when you go to commit, run the line above first, then commit.

Wrapping up

  1. Stage. Open Source Control in the left bar (the icon that looks like a branching line). Your changed files are listed under Changes. Click the + next to each one, or the + on the Changes heading to stage them all.
  2. Message, then commit. In the box above the list, write what you did in plain words, like answered the three questions. Click Commit.
  3. Push. The button turns into Sync Changes. Click it. That sends your commit to GitHub; until you do, it exists only inside the Codespace. Check your repository's page on github.com: your commit message should be there.
  4. Stop the Codespace. On your repository's page: Code > Codespaces, the three dots next to yours, Stop codespace. It stops itself after thirty minutes idle, but doing it yourself is the habit, and Codespaces hours come out of your own monthly allowance.

Stopping is not deleting. Your Codespace and everything in it are still there next time.

When it does not work

Post in #fall-2026 on Slack with a screenshot and the step you were on. If it is during class, raise your hand; an FA will come to you.