Can anyone help me to find and edit ENV variables?
A number of posts indicate hidden settings can be edited like
max_category_nesting
but when I search for that specific item in the app I come up with “not found”
So guess I’m going about it wrong, any help is appreciated
Thank you!
simon
July 7, 2021, 10:09pm
2
Hidden site settings can be set from your site’s Rails console. If you enter the Rails console and enter SiteSetting.max_category_nesting
, the setting’s current value should be returned. Assuming that you want to update its value to 3, you can do that with the following command:
SiteSetting.max_category_nesting=3
4 Likes
That’s fantastic news thank you
but…
Can you point me to where I locate or install a Rails console please?
simon
July 8, 2021, 12:23am
4
You can access the Rails console from your site’s server. First ssh into the server, then:
cd /var/discourse
./launcher enter app
From the prompt that appears, run rails c
to enter the console.
3 Likes
Many thanks
I did enter 3 and after a reboot tried to add a 3rd sub category layer, got a 403 error,
Then I assigned a position in the settings and it worked!
Though it changed the look in a manner I wasn’t prepared for, but its nice to have made it this far, feels like Christmas morning, thank you again!
BTW, are there any good sources you can point me to to learn all the rails options?
For instance I don’t even know what pry (main) is referring too
The “console” was a bit lackluster
system
(system)
Closed
August 7, 2021, 1:26am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.