You are here:No install GitHub Codespaces
Open a codespace
WhyVS Code in your browser, on a cloud machine that runs on your own GitHub quota.
A GitHub account is required, and the codespace runs on your own Codespaces quota: GitHub's free plan includes 120 core-hours and 15 GB-month of storage a month, about 60 hours on the default 2-core machine the playground uses. GitHub stops an idle codespace after 30 minutes by default; its storage counts until you delete it.
What opens
- The blog with tutorial steps 02, 03, 04 and 07 done:
cybertrain new blog, the article scaffold, the root route and the first migration, built once so the server starts without compiling. - A terminal running
cybertrain server. - The app in a new browser tab, showing the article list.
PLAYGROUND.md, the short guide to what to try.- Source Control: the app is a git repository with one commit, so it shows exactly what you change.
If VS Code asks whether you trust the authors of the files in this folder, choose “Trust Folder & Continue”: the server’s terminal starts only then.
What to try
- Edit a view. It shows on the next reload: views are read from disk on every request.
- Add a validation. Ruby is compiled, so a Ruby change is a full rebuild, about a minute, after which the server restarts by itself.
- Carry on with the tutorial from step 08, Scaffold comments.
- Start a fresh app.
cybertrain newworks in the codespace with no network.
The app's tab does not reload by itself: reload it after a change. If the app's tab did not open (a pop-up blocker, or the codespace was stopped and restarted), click “Open in Browser” in VS Code's notification for port 3000 or in the Ports view, or Ctrl-click the app's URL in the server terminal. PLAYGROUND.md shows where each is.
Run it with Docker
WhyThe same image runs on your own machine.
docker run --rm -it --init -p 127.0.0.1:3000:3000 -e CYBERTRAIN_HOST=0.0.0.0 ghcr.io/saeki-mototsune/cybertrain-playground
Then open http://localhost:3000. The published image is linux/amd64; on an arm64 machine, build it from a checkout as playground/README.md describes.