# בעיות בהתקנת Discourse על WSL

**URL:** <https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297>\
**Category:** Self-hosting\
**Tags:** dev-install\
**Created:** [20 ביולי,‏ 2023,‏ 2:07pm UTC](https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297 "2023-07-20T14:07:23Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![resakdo22](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/resakdo22/32/316520_2.png) [@resakdo22](https://meta.discourse.org/u/resakdo22)\
**Post date:** [20 ביולי,‏ 2023,‏ 2:07pm UTC](https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297/1 "2023-07-20T14:07:23Z")

</div>

Hello! I’m trying to get a local instance of Discourse on my Windows 11 machine to work on development using WSL.

Let me first just say that I’m both new to Discourse, Ubuntu and WSL. So the errors clearly are coming from my end. Please help me! 😦

[Install Discourse on Windows 10](https://meta.discourse.org/t/install-discourse-on-windows-10-for-development/75149)

This above is the guide that I followed.

I’m in my fourth try and I keep on encountering the same errors. I will provide a detailed rundown of the installation process.

First, I made sure to have Windows Subsystem for Linux 2. The guide suggests Ubuntu 18.04, so I tried that one. After that didn’t work, I tried 22.04 but still no result. In this rundown, I will be using 18.04 to showcase the errors.

The first step is to install the packages using this command:

1. 

```plaintext
bash <(wget -qO- https://raw.githubusercontent.com/discourse/install-rails/master/linux)

```

This works fine. The only thing that looks a little odd is this:

```plaintext
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

```

1. 

Before setting up the database you have to start PostgreSQL service & Redis server manually using following commands

```plaintext
sudo service postgresql start
redis-server --daemonize yes

```

First command works like a charm, second one already has an issue:

> redis-server --daemonize yes
> 
> Command ‘redis-server’ not found, but can be installed with:
> 
> sudo apt install redis-server

That’s fine. I run

> sudo apt install redis-server

and try again.  
This time, it works great!

1. Clone the Discourse repo

```plaintext
git clone https://github.com/discourse/discourse.git ~/discourse

```

No issues here.  
Setting up the database with:

```plaintext
sudo -u postgres createuser -s "$USER"

```

**4. Here is the vital part**

```plaintext
cd ~/discourse

```

```plaintext
source ~/.bashrc
bundle install

```

Error:

> Command ‘bundle’ not found, but can be installed with:

> sudo apt install ruby-bundler

Let’s run it. And after installation, again run

> bundle install

inside the Discourse directory.

> Error: You must use Bundler 2 or greater with this lockfile.

After that, when trying to install 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.

Ok, maybe I need to update my Ruby using rbenv:

> rbenv install 2.6.0  
> ruby-build: definition not found: 2.6.0
> 
> See all available versions with `rbenv install --list’.
> 
> If the version you need is missing, try upgrading ruby-build.

When checking rbenv install --list, it cuts off at 2.5.0 and I can’t seem to update rbenv.

Can somebody give me a hint of what I may be doing wrong? I can’t seem to go any further than step 4.

Thank you very much, in advance!

---

_[View the full topic](https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297)._
