안녕하세요! Windows 11 환경에서 WSL을 사용하여 개발용으로 로컬 Discourse 인스턴스를 실행하려고 하고 있습니다.
먼저 말씀드리면, 저는 Discourse, Ubuntu, WSL 모두 초보입니다. 따라서 오류는 분명 제 실수에서 비롯된 것입니다. 도와주세요! ![]()
Install Discourse on Windows 10
위 링크는 제가 따라 진행한 가이드입니다.
네 번째 시도인데, 계속 같은 오류가 발생합니다. 설치 과정에 대해 자세히 설명드리겠습니다.
먼저, Windows Subsystem for Linux 2가 설치되어 있는지 확인했습니다. 가이드에서는 Ubuntu 18.04를 권장하므로 해당 버전을 먼저 시도해 보았습니다. 하지만 작동하지 않아 22.04도 시도해 보았으나 결과는 마찬가지였습니다. 이 글에서는 오류를 보여주기 위해 18.04를 기준으로 설명하겠습니다.
첫 번째 단계는 다음 명령을 사용하여 패키지를 설치하는 것입니다:
bash <(wget -qO- https://raw.githubusercontent.com/discourse/install-rails/master/linux)
이 부분은 정상적으로 작동합니다. 다만 약간 이상해 보이는 부분은 다음과 같습니다:
createuser: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
failed
데이터베이스를 설정하기 전에 다음 명령을 사용하여 PostgreSQL 서비스와 Redis 서버를 수동으로 시작해야 합니다.
sudo service postgresql start
redis-server --daemonize yes
첫 번째 명령은 완벽하게 작동하지만, 두 번째 명령은 문제가 있습니다:
redis-server --daemonize yes
Command ‘redis-server’ not found, but can be installed with:
sudo apt install redis-server
그렇습니다. 다음을 실행합니다.
sudo apt install redis-server
그리고 다시 시도합니다.
이번에는 잘 작동합니다!
- Discourse 저장소를 클론합니다.
git clone https://github.com/discourse/discourse.git ~/discourse
여기서는 문제가 없습니다.
데이터베이스를 설정합니다:
sudo -u postgres createuser -s "$USER"
4. 핵심 부분입니다
cd ~/discourse
source ~/.bashrc
bundle install
오류:
Command ‘bundle’ not found, but can be installed with:
sudo apt install ruby-bundler
실행해 보겠습니다. 설치 후, 다시 Discourse 디렉터리 안에서 다음을 실행합니다.
bundle install
Error: You must use Bundler 2 or greater with this lockfile.
그 후, Bundler를 설치하려고 할 때:
ERROR: Error installing bundler: There are no versions of bundler (= 2.4.17) compatible with your Ruby & RubyGems bundler requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.
좋아요, 아마도 rbenv를 사용하여 Ruby를 업데이트해야 할 것 같습니다:
rbenv install 2.6.0
ruby-build: definition not found: 2.6.0See all available versions with `rbenv install --list’.
If the version you need is missing, try upgrading ruby-build.
rbenv install --list를 확인해 보면 2.5.0에서 끊겨 있고, rbenv를 업데이트하는 방법도 찾지 못하고 있습니다.
제가 어디를 잘못하고 있는지 힌트를 주실 수 있을까요? 4단계 이후로는 더 이상 진행이 되지 않습니다.
미리 감사드립니다!