Beginners Guide to Install Discourse on Ubuntu for Development

dev-install
(verilog) #275

I solved to problem and updated my comment with the solution. Thank you for your help :slight_smile:

1 Like
(SteveM) #276

I’m getting the following error:


It appears to be a postgres connection issue. The log file says that it’s

listening on Unix socket "/var/run/postgresql/.s.PGSQL.5443"

(Sam Saffron) #277

This looks like WSL to me… I think you need to start the postgres service systemctl start postgresql probably. Same goes for starting redis.

1 Like
(SteveM) #278

Both postgres and redis appear to be running from what I can tell.

ss2

And when I do redis-cli ping, it returns PONG

(Sam Saffron) #279

Is the socket file there? Maybe you had pg on win10 so it picked a different port?

1 Like
(SteveM) #280

Sure enough, it’s running on port 5433. Would be better to try to free up 5432, or change the installation somehow to recognize 5433?

Edit: Nevermind, pg is running on 5432. That’s not the problem.

Another Edit: Ok, I did have pg installed on windows previously. Not sure when/why/how…I’m a bit dense sometimes. Thanks for the help!

(SteveM) #281

I’m getting many rspec failures as others have reported above. And attempting to start the rails server also results in errors, and eventually an endless error loop.

Edit: Found the solution discussed under the Windows install guide here:

This install is not for the faint of heart. :smiley:

1 Like
(Kids Unleashed) #282

I am running this autospec but its just hanging, is it suppose to do something?

(Régis Hanol) #283

How long have you waited? After it has loaded the app (which might take several seconds), it should start displaying lots of dots (.).

3 Likes
(Jack Hodgson) #284

When running bundle exec rails server, I’m left with a bunch of errors…

:confused: - any help?

(Sam Saffron) #285

Unicorn does not work on wsl at the moment, you are going to have to use puma

5 Likes
(Kk9209) #286

hi, discourse server can run in daemon?

(Sam Saffron) #287

In dev mode you usually would not cause you are constantly restarting.

3 Likes
#288

What is the recommended way of updating Discourse to a newer version in this Dev environment?

(my Dashboard says sidekiq isn’t running. I would be ok with instructions to update without Sidekiq unless you explain to me that this is a really silly thing to ask)

(Sam Saffron) #289
git pull
bin/rake db:migrate
RAILS_ENV=test bin/rake db:migrate
6 Likes
#290

Thanks for that @sam. It worked!

… except that before having a chance to do that, I fell into the trap of the infamous nokogiri installation problems. Nothing that 4 or 5 hours of work couldn’t solve… :tired_face:

Looking at my scars from all this, the best advice I can give to future despairing nokogiri users is this, from their site:

If this doesn’t work:

gem install nokogiri

then please start troubleshooting here:

nokogiri.org/tutorials/installing_nokogiri.html

There are currently 1,237 Stack Overflow questions about Nokogiri installation. The vast majority of them are out of date and therefore incorrect. Please do not use Stack Overflow.

2 Likes
(Jeff Atwood) #291

Press the edit button and improve them. It’s a wiki. Works even for anonymous users.

3 Likes
#292

I think the correct answers are already there, somewhere in the middle of those 1237 questions. I also think SO did it’s job well, it’s just that nokogiri probably had some bad moments in the past where installation was too tricky to get right, and that’s not easy to clear away from the Internet’s memory.

I guess a good way to contribute (apart from editing content which is always good, I agree) is to link from somewhere to the correct answers so that Google starts to take people to the best spots of SO knowledge about nokogiri…

Of course that sentence (in bold :man_facepalming:) up there about not using SO is just for this case in particular, at this moment in time. I find it immensely useful, and it saves my butt quite often. I even contribute a bit, occasionally. I never said thank you to one of the founders, though…

Thank you :smiley:.

2 Likes
(Kk9209) #293

ok, but how to change production mode, have any tutorial?

(Philip Rhoades) #294

@techAPJ ,

Actually, I would like to have this guide for Fedora development - if there was some interest here - I could help with that . .