Skip to main content

Gitpod

If you prefer working on a cloud IDE, you can spin up your own instance of Forem in the cloud, using Gitpod.

  1. Fork the Forem repository. Navigate to https://github.com/forem/forem and click on the Fork button.

Repository Fork button

  1. Copy the URL of your forked repository, e.g. https://github.com/forked-user/forem
  2. In the browser address bar enter, e.g. https://gitpod.io/#https://github.com/forked-user/forem, where the URL after https://gitpod.io/# is the forked repository address. Note: If it's your first time using Gitpod, you will be redirected to their sign in/sign up flow.
  3. Gitpod will load your forked version of Forem. If it's the first time doing this, it will take several minutes. All the pieces you need for your cloud environment are installing, including Ruby gems and npm packages.

Gitpod prebuild running

Gitpod building containers

  1. The IDE opens

Gitpod IDE

  1. Gitpod prompts to install the recommended extensions. It's not required, but it will provide a better editing experience.

Gitpod install recommended extensions

  1. It will still take a few minutes to prepare the workspace.
  2. Two terminal sessions will be running. The one named Open Site: gp with the prompt Awaiting port 3000....

Gitpod Open Site terminal session

This will remain until the web server is started which is running in the other terminal session named Forem Server: bash.

Gitpod Forem Server terminal session

  1. The local Forem development instance loads in the Gitpod browser preview window.

Gitpod browser preview with the Forem development instance loaded

  1. You can now code, review, or try out the project.

Additional information:

  • The Forem local development instance ships with one user, the admin account. The email for the user is admin@forem.local and the password is password.
  • More about Gitpod in this article on dev.to about Gitpod and Forem (previously DEV).
  • Although other methods of authentication are available, only email will work.

Gitpod Forem login page

To use other forms of authentication, they need to be configured. Visit the Authentication section to configure social logins.

  • Instead of manually building a Gitpod URL and pasting it in the browser's address bar, consider installing the Gitpod browser extension.

GitHub CLI​

Forem’s Gitpod configuration ships with the GitHub CLI. You can create a pull request right from the command line by running the following command: gh pr create. 🤯

GitHub CLI creating a pull request

The first time you use the GitHub CLI in Gitpod for any remote commands, like gh pr create, you will need to authenticate to GitHub via the GitHub CLI, i.e. gh auth login.

GitHub CLI login prompt

It is recommended to login to GitHub via SSH.

GitHub CLI login via SSH

Follow the instructions from the GitHub CLI to finish logging in. The browser login to Github will open in the Gitpod preview browser window and fail to load. Copy the URL from the Gitpod browser preview window and paste it in a browser tab address bar instead to complete the authentication to GitHub.

For more information on how to use the GitHub CLI, see the official GitHub CLI documentation.