To follow-up on @ben's post, Gitpod allows you to spin up Forem's codebase on the cloud and makes it available to you in the browser. Really, a fully working local instance in your browser. Within minutes.
If you already tried to spin up Forem on Gitpod as the documentation describes, most probably you couldn't push the changes. That is perfectly normal; contributors are not allowed to (and they shouldn't) push changes directly into the original repo.
remote: Permission to forem/forem.git denied to BogDAAAMN. fatal: unable to access 'https://github.com/forem/forem/': The requested URL returned error: 403
The solution is to push the changes to your Forem fork instead. The fastest way to do that is to change the
origin of the project. Gitpod allows that in a bunch of ways.
If you take a quick look at the remote right after Gitpod's initialization, the
origin is pointing to the Forem repository. If you push now, naturally, the changes go to the
$ git remote -v origin https://github.com/forem/forem.git (fetch) origin https://github.com/forem/forem.git (push)
To work this out, fire up a terminal in Gitpod and set the
origin to your Forem fork (assuming you already have one).
$ git remote set-url origin https://github.com/<YOUR_USERNAME>/forem $ git remote -v origin https://github.com/<YOUR_USERNAME>/forem.git (fetch) origin https://github.com/<YOUR_USERNAME>/forem.git (push)
Cool, from now on you will push your commits to the new
origin – your fork.
You still need to add the Forem repository as
upstream because you will need to pull and fetch the latest changes from
$ git remote add upstream https://github.com/forem/forem $ git remote -v origin https://github.com/<YOUR_USERNAME>/forem.git (fetch) origin https://github.com/<YOUR_USERNAME>/forem.git (push) upstream https://github.com/forem/forem.git (fetch) upstream https://github.com/forem/forem.git (push)
A visual approach to changing the
origin to your fork is to use the Gitpod UI Git panel (left side toolbar). Click on the Git button. If the remote repository is set to
forem/forem and you don't have the right to push changes, a yellow warning will appear stating that You don't have push permissions for
A quick fix is to click on the
Gitpod's command palette will pop up, asking you to Switch to existing fork.
If you didn't fork the Forem repo yet, you will have to provide access to Gitpod to create one. Then you will be able to switch to the freshly created one.
Cool, now wait for confirmation. Once the prompt (bottom right-hand side) says that the remote was successfully changed to your fork, you are good to go! Gitpod took care of changing the remote of the repo for you.
As explained in the community forum, Gitpod will fire up any repository URL you provide.
If you already forked Forem, you can simply paste your repo URL into
https://gitpod.io/#<URL>. Gitpod will clone your fork and spin up the Forem local instance in your browser.
I absolutely love Gitpod for removing a lot of friction from running Forem on my machine. Pretty awesome how it makes it possible to fiddle with the code within minutes. It helps a lot if you always mess up trying to install the right Ruby version locally :)
However, there are still issues and bugs that the community encountered while trying to work on Gitpod. Fell free to Pull Request along!
Describe the bug
Creating a new GitPod instance leads to a bug where under
gem install solargraph; bin/setup && bin/startup the
bin/setup script fails at
yarn install due to incorrect node version being used (which is 12.18.x).
The GitPod Dockerfile does handle the installation of nvm and correct node version, but forgets to switch to the correct node version (12.16.3).
- Create a GitPod Workspace with https://gitpod.io/#https://github.com/thepracticaldev/dev.to
- Wait till
bundle installfinishes in the third
- Yarn throws the error as indicated in screenshot below.
Correct node version is selected in nvm, which allows the
yarn install command to complete successfully.
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Edge
- Version: 83
nvm use command can be of help.