Issues attempting to run discourse in GitHub Codespaces

Following this post from @CvX on a fresh GitHub codespace install:

Running bin/ember-cli -u (FYI for anyone else, you first have to cd into workspace/discourse), nets the following issue:

For anyone else, run the following command:

bundle install --gemfile ./Gemfile

from the /var/www/discourse/workspace/discourse directory.

Then, re-run bin/ember-cli -u and it should work. I’m just now learning codespaces, so not sure yet if this can be resolved in advance or not but it seems like it could be.

After successfully running, navigating to http://localhost:4200/ results in the following error:

I see in the logs of the bin/ember-cli -u command:

Proxying to http://127.0.0.1:3000

but navigating to localhost:3000 results in the following error:
image

It seems if, after running, you grab your generated hostname and add it to your development.rb file, like this:

config.hosts << "reimagined-journey-9rv47jjqvqfxx7r-4200.app.github.dev"

You can then access the host!

2 Likes

For anyone else coming across this, you’ll have one last issue:

You’ll need to stop your instance of ember-cli, and run the following command first:

bundle exec rake admin:create

Follow the instructions to create an admin account, and then re-run bin/ember-cli -u and you’ll finally have a working development instance of Discourse in GitHub Codespace.

1 Like

For anyone else running into issues here, I wrote a guide for getting your environment setup with GitHub Codespaces so you don’t have to suffer:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.