Natively install Discourse in Arch Linux



I’m using ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux].

I wanted to install Discourse, so after a

sudo -u discourse -s /usr/bin/bash -c "cd /srv/http/discourse; bundle install --no-cache --no-prune --deployment --without development test"

I was running:

sudo -u discourse -s /usr/bin/bash -c "cd /srv/http/discourse; bundle exec rake db:create db:migrate db:test:prepare RAILS_ENV=production"

then at the end, I got:

== Seed from /srv/http/discourse/db/fixtures/500_lounge_category.rb

== Seed from /srv/http/discourse/db/fixtures/501_meta_category.rb

== Seed from /srv/http/discourse/db/fixtures/502_staff_category.rb

== Seed from /srv/http/discourse/db/fixtures/999_settings.rb

== Seed from /srv/http/discourse/db/fixtures/999_topics.rb
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/srv/http/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.10/lib/active_record/tasks/database_tasks.rb:144:in `purge'
/srv/http/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.10/lib/active_record/railties/databases.rake:347:in `block (3 levels) in <top (required)>'
/srv/http/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.10/lib/active_record/railties/databases.rake:353:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:test:load => db:test:purge

It’s with the Master version of Discourse I’m getting this issue and also with some previous tested versions like 1.3.2.

(Rafael dos Santos Silva) #2

Are you following the only supported way to install discourse?


No. I’m on ArchLinux. (It’s a bug to support only Discourse based on an Docker-Ubuntu image). So, could you officially support Discourse based on Docker-ArchLinux image? Or, could you support natively ArchLinux and remove the heavy Docker? I guess it’s a no.

(Felix Freiberger) #4

Since Arch Linux supports Docker, Discourse should run just fine on it.


The Docker image is based only on Ubuntu not on ArchLinux. discourse_docker/Dockerfile at master · discourse/discourse_docker · GitHub

When we choose ArchLinux, we choose ArchLinux, not Ubuntu…

Seriously, you should support a Docker-ArchLinux image. And btw, it’ll be great to fix the bug above.Thanks :slightly_smiling:

(Felix Freiberger) #6

What you’re describing above is not a bug – you are simply not using the supported install method.

Why should you care about the operating system inside the container?


It’s not an install method. When you use a container, you don’t really install it, you are just bloating your operating system with the bleeding-edge of virtualization and encouraging the laziness of some software developers that prefer their own environment to the environment of their potential users.

So, yes it’s a bug, and yes, it’s your choice to support only an Ubuntu-based Docker image that runs Discourse.

Can Discourse ship frequent Docker images that do not need to be bootstrapped?
(Felix Freiberger) #8

If you want to see it like this, feel free to do so. You will be on your own, however: In this forum, we can only support the Docker-based installation.


Ok. I was using Flarum. I’ll probably migrate to NodeBB. :sob:

(Mittineague) #10

Discourse is open source.

If you want to do things “your own way” there’s nothing stopping you from doing so.

The main issue is support. The Discourse team has a lot on it’s plate just helping those that are doing things the supported way.

Supporting non-Discourse-supported procedure sounds like a golden business opportunity for you.


For Discourse, I’m using only the ArchLinux package from the ArchLinux AUR.

ArchLinux follows the KISS principle unlike Ruby on Rails, Ubuntu or Docker.

Nope, it’s not a golden business opportunity because I’ll migrate to NodeBB that supports ArchLinux.

And Flarum is also a great alternative to Discourse. But it’s currently in Beta and some issues are not fixed, so I’ll choose NodeBB. :kissing_heart:

(Jeff Atwood) #12