The original poster, Abdul_Hanan, is trying to run the Discourse app locally in a production environment without using Docker, but is encountering an error. merefield and rishabh clarify that running a production environment locally and without Docker is not supported.
For production, rishabh points to the supported install documentation, and merefield notes that seeking support for alternative setups may require payment.
merefield also shares a project for running Discourse on a Raspberry Pi using Docker, which may be replicable on WSL2.
After setting up using Docker, Abdul_Hanan needs to make changes to the Rails code for the production environment. merefield suggests building a plugin or creating a theme component, depending on the type of changes required.
Getting an error while running app in locally in production env.
dev/discourse/lib/discourse.rb:551:in
`current_hostname’: uninitialized constant Discourse::SiteSetting (NameError)
Did you mean? Discourse::SiteSettingMissing
from /Users/dev/discourse/config/initializers/100-verify_config.rb:7:in `’
you can do what you feel like, but getting support for other setups is going to be tricky unless you want to pay someone
There’s a fun project here using a cloudfare tunnel for running Discourse locally on a raspberry pi, which you might be able to replicate on WSL2 … but both in Docker.