Discourse

Platform:

Channel Revision Published Runs on
latest/stable 263 23 Jun 2026
Ubuntu 22.04 Ubuntu 20.04
latest/stable 249 22 Jun 2026
Ubuntu 22.04 Ubuntu 20.04
latest/edge 268 Today
Ubuntu 22.04 Ubuntu 20.04
latest/edge 249 07 Apr 2026
Ubuntu 22.04 Ubuntu 20.04
juju deploy discourse-k8s

How to access the Rails console

Ideally, the Discourse charm should be handled by interacting with Juju, and everything that can be done with the console should be doable with Juju actions. In case there is something that needs to be done with the console anyway, the console can be accessed.

Prerequisites

Have a Discourse deployment active.

Access the console

First of all, switch into the Juju Discourse model if necessary:

juju switch discourse-model

Then ssh into the Discourse unit:

juju ssh --container discourse discourse-k8s/leader bash   

Now access the console using Pebble:

pebble exec --user=_daemon_ --context=discourse -w=/srv/discourse/app -ti -- /srv/discourse/app/bin/bundle exec rails console

If the output of the last command contains something similar to this:

Loading production environment (Rails 7.0.5.1)
irb(main):001:0>

Congratulations, you have accessed the rails console.


Help improve this document in the forum (guidelines). Last updated 1 year, 3 months ago.