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:
jordan-violet documents their troubleshooting journey setting up Discourse in GitHub Codespaces. Initially, running bin/ember-cli -u fails until they run bundle install --gemfile ./Gemfile from the discourse directory 2. Even after success, accessing localhost:4200 or localhost:3000 results in errors 3, 4. The fix involves adding the generated Codespace hostname (e.g., reimagined-journey-9rv47jjqvqfxx7r-4200.app.github.dev) to config.hosts in development.rb 5. One final step: stopping Ember CLI and running bundle exec rake admin:create to create an admin account before restarting the server 6. To help others, jordan-violet published a full guide: Guide to Setting Up Discourse Development Environment (GitHub Codespace).
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.
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.
![]()
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: