How to install discourse and run it in dev mode
ยท One min read
- install node (use nvm)
- install gems
First thing first, install redis. Then install postgresql.
# 1. install redis
sudo dnf install redis # Install redis cli and server
sudo systemctl start redis # Initialize redis server
sudo systemctl enable redis
redis-cli ping
# 2. install postgresql
sudo dnf install postgresql-server postgresql-contrib
sudo postgresql-setup --initdb --unit postgresql
sudo systemctl enable postgresql
sudo systemctl start postgresql
## check postgresql connection with user postgresql
psql -U postgres -h localhost
# clone discourse
git clone https://github.com/discourse/discourse.git
cd discourse
# prep
sudo dnf install libyaml-devel
npm install -g pnpm
# update gem
sudo gem update --system 3.7.2
gem install bundler
bundle install --gemfile /home/j/test/discourse/Gemfile
# edit database conf
nano config/database.yml
#
# TODO check if postgres is running and working
#
./bin/dev
# connect to http://localhost:3000
source
- https://github.com/discourse/discourse/blob/main/docs/INSTALL.md
- https://developer.fedoraproject.org/start/sw/web-app/rails.html
- https://discuss.rubyonrails.org/t/cant-setup-rails-psych-yaml-issue/83968/2
errors
cat /home/j/.local/share/gem/ruby/extensions/x86_64-linux/3.3.0/psych-5.2.6/mkmf.log