# GitHub Codespaces에서 Discourse 실행 시 발생하는 문제

**URL:** https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189
**Category:** Development
**Created:** [5월 8, 2024, 1:02오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189 "2024-05-08T01:02:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 1:02오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/1 "2024-05-08T01:02:31Z")

</div>

@cvx의 이 게시글을 따라 새로운 GitHub codespace 설치 후 진행한 결과:

> [@GitHub Codespaces에서 Discourse가 작동하지 않음](https://meta.discourse.org/t/discourse-on-github-codespaces-not-working/230179/3?u=sp-jordan-violet):
>
> I think everything should be working fine – the only step you’re missing is starting the server smiley Switch to the other terminal tab (bash): and run: bin/ember-cli -u After it starts you can open the site by cmd-clicking/ctrl-clicking the URL in the output: And you’re done! I think we can streamline it a bit more. There’s definitely room for improvement!

`bin/ember-cli -u`를 실행하면 (참고로 다른 분들을 위해 말씀드리면, 먼저 `workspace/discourse`로 cd를 해야 합니다) 다음과 같은 문제가 발생합니다:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/1/b/21b2102c65c24d5d82ac38a4770d3b420914f0a4.png)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 8:58오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/2 "2024-05-08T08:58:16Z")

</div>

다른 분들을 위해 다음 명령어를 실행하세요:

```plaintext
bundle install --gemfile ./Gemfile

```

`/var/www/discourse/workspace/discourse` 디렉터리에서 실행해야 합니다.

이후 `bin/ember-cli -u`를 다시 실행하면 작동할 것입니다. 저는 이제 막 코드스페이스(Codespaces)를 배우고 있는 중이라, 이 문제가 사전에 해결될 수 있는지 아직 확실하지 않지만, 그렇게 될 것 같습니다.

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 9:02오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/3 "2024-05-08T09:02:25Z")

</div>

성공적으로 실행한 후 `http://localhost:4200/`으로 이동하면 다음과 같은 오류가 발생합니다:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/3/2/332f202ea4f0be189090b36cfac38709663889dc.png)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 9:05오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/4 "2024-05-08T09:05:11Z")

</div>

`bin/ember-cli -u` 명령의 로그에서 다음을 확인했습니다:

```plaintext
Proxying to http://127.0.0.1:3000

```

하지만 `localhost:3000`으로 이동하면 다음 오류가 발생합니다:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/e/3/8e31043fc040a7aaa3b351b494b3b1de0e8f1aed.png)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 9:31오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/5 "2024-05-08T09:31:04Z")

</div>

실행 후 생성된 호스트 이름을 가져와서 `development.rb` 파일에 다음과 같이 추가하면 되는 것 같습니다:

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

```

그렇게 하면 해당 호스트에 접근할 수 있습니다!

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/3/f/63fb0bd6110fc952ec6071fb481aa8ab55632176.png)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 9:34오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/6 "2024-05-08T09:34:24Z")

</div>

이 글을 참고하는 다른 분들을 위해, 마지막에 한 가지 문제가 더 있습니다:

`ember-cli` 인스턴스를 중지한 다음, 먼저 다음 명령을 실행해야 합니다:

```plaintext
bundle exec rake admin:create

```

지시에 따라 관리자 계정을 만든 후 `bin/ember-cli -u`를 다시 실행하면 마침내 GitHub Codespace에서 작동하는 Discourse 개발 인스턴스를 얻을 수 있습니다.

![](https://media.tenor.com/PCC19RJ1deYAAAAC/thumbs-up-nice.gif)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [5월 8, 2024, 10:45오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/7 "2024-05-08T10:45:36Z")

</div>

여기서 문제를 겪고 계신 분들을 위해, 고생하지 않고 환경을 설정할 수 있도록 GitHub Codespaces를 사용한 환경 설정 가이드를 작성했습니다:

> [@(구버전) GitHub Codespace에서 Discourse 개발 환경 설정하기](https://meta.discourse.org/t/guide-to-setting-up-discourse-development-environment-github-codespace/307231):
>
> GitHub Codespaces를 이용한 개발 [GitHub Codespace](https://docs.github.com/en/codespaces/overview)는 훌륭한 개발 옵션입니다. 클라우드에 호스팅되므로, 여기에서 개발하는 모든 사람이 동일한 환경을 가질 수 있도록 쉽게 보장할 수 있고, 로컬 docker 설치와 씨름할 필요가 없으며, 로컬 개발 인스턴스를 공개적으로 사용 가능하게 만드는 데 쉽게 접근할 수 있고, 새로운 기술을 사용하는 것 자체가 재미있기 때문입니다. 저는 현재 개발을 다시 배우고 있으며, Discourse 개발을 배우는 것 외에도 GitHub Codespaces를 배우기로 결정하여, 로컬 환경을 설정하는 대신 GitHub Codespace에서 Discourse를 개발하려는 다른 사람들을 위해 이 가이드를 만들었습니다. 저는 GitHub Codespace에서 이를 작동시키기 위해 여러 문제를 겪은 후 이 가이드를 작성하기로 결정했습니다: 이 가이드는 아무것도 전제하지 않으므로, 여러분이 실행할 수 있도록 하는 단계를 하나도 놓치지…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [6월 7, 2024, 10:45오전 UTC](https://meta.discourse.org/t/issues-attempting-to-run-discourse-in-github-codespaces/307189/8 "2024-06-07T10:45:39Z")

</div>

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