From e42fa9711e9a8b27e9618342b5b456d3ba5b8025 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Tue, 4 Mar 2025 12:28:25 +0800 Subject: [PATCH] Drop `pry` as default runtime console. (#947) Using `pry` as the default runtime console in the production environment is forcing us to account for it in Discourse core's codebase. In order to avoid the additional complexity in Discourse core's codebase, we have decided to drop `pry` as the default runtime console and rely on IRB which is just as good these days. We will however be keeping the dependency on `pry` around so those that would like to use it can start it manually. --- templates/web.template.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/templates/web.template.yml b/templates/web.template.yml index 9b541c9..813a63f 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -240,13 +240,7 @@ run: chmod: +x contents: | #!/bin/bash - # If they requested a console, load pry instead - if [ "$*" == "c" -o "$*" == "console" ] - then - (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec pry -r ./config/environment) - else - (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec script/rails "$@") - fi + (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec script/rails "$@") - file: path: /usr/local/bin/rake -- 2.25.1