summaryrefslogtreecommitdiff
path: root/doc/administration
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 21:10:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 21:10:45 +0000
commit98692a8dd50b5325d3f846c70ec804d0a9442f55 (patch)
tree7ec8d2d762f56e1124a846194b078c062f5de8a2 /doc/administration
parented5add1c2f001c9bd54e664b32f212de172eca6a (diff)
downloadgitlab-ce-98692a8dd50b5325d3f846c70ec804d0a9442f55.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration')
-rw-r--r--doc/administration/troubleshooting/debug.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/administration/troubleshooting/debug.md b/doc/administration/troubleshooting/debug.md
index d0c1f3fa0ff..1e1b2ad8378 100644
--- a/doc/administration/troubleshooting/debug.md
+++ b/doc/administration/troubleshooting/debug.md
@@ -62,8 +62,8 @@ puts Readline::HISTORY.to_a
## Using the Rails Runner
-If you need to run some Ruby code in thex context of your GitLab production
-environment, you can do so using the [Rails Runner](https://guides.rubyonrails.org/command_line.html#rails-runner).
+If you need to run some Ruby code in the context of your GitLab production
+environment, you can do so using the [Rails Runner](https://guides.rubyonrails.org/command_line.html#rails-runner). When executing a script file, the script must be accessible by the `git` user.
**For Omnibus installations**
@@ -72,6 +72,9 @@ sudo gitlab-rails runner "RAILS_COMMAND"
# Example with a two-line Ruby script
sudo gitlab-rails runner "user = User.first; puts user.username"
+
+# Example with a ruby script file
+sudo gitlab-rails runner /path/to/script.rb
```
**For installations from source**
@@ -81,6 +84,9 @@ sudo -u git -H bundle exec rails runner -e production "RAILS_COMMAND"
# Example with a two-line Ruby script
sudo -u git -H bundle exec rails runner -e production "user = User.first; puts user.username"
+
+# Example with a ruby script file
+sudo -u git -H bundle exec rails runner -e production /path/to/script.rb
```
## Mail not working