Commit 3f291fe4 authored by Marcel Amirault's avatar Marcel Amirault Committed by Toon Claes

Change CLI to -e for environment

Using RAILS_ENV is deprecated, so we need to
change to -e in our examples.
parent 71c834ef
...@@ -353,7 +353,7 @@ you can flip the feature flag from a Rails console. ...@@ -353,7 +353,7 @@ you can flip the feature flag from a Rails console.
```shell ```shell
cd /home/git/gitlab cd /home/git/gitlab
RAILS_ENV=production sudo -u git -H bundle exec rails console sudo -u git -H bundle exec rails console -e production
``` ```
1. Flip the switch and disable it: 1. Flip the switch and disable it:
......
...@@ -106,7 +106,7 @@ gitlab-rails console ...@@ -106,7 +106,7 @@ gitlab-rails console
# Installation from source # Installation from source
cd /home/git/gitlab cd /home/git/gitlab
sudo -u git -H bin/rails console RAILS_ENV=production sudo -u git -H bin/rails console -e production
``` ```
**To check if incremental logging (trace) is enabled:** **To check if incremental logging (trace) is enabled:**
......
...@@ -30,7 +30,7 @@ sudo gitlab-rails console ...@@ -30,7 +30,7 @@ sudo gitlab-rails console
For source installations, you'll have to instead run: For source installations, you'll have to instead run:
```shell ```shell
sudo -u git -H bundle exec rails console RAILS_ENV=production sudo -u git -H bundle exec rails console -e production
``` ```
Further code examples will all take place inside the Rails console and also Further code examples will all take place inside the Rails console and also
......
...@@ -41,8 +41,8 @@ Access the database via one of these commands (they all get you to the same plac ...@@ -41,8 +41,8 @@ Access the database via one of these commands (they all get you to the same plac
```ruby ```ruby
gdk psql -d gitlabhq_development gdk psql -d gitlabhq_development
bundle exec rails dbconsole RAILS_ENV=development bundle exec rails dbconsole -e development
bundle exec rails db RAILS_ENV=development bundle exec rails db -e development
``` ```
- `\q`: Quit/exit - `\q`: Quit/exit
......
...@@ -78,7 +78,7 @@ The last option is to import a project using a Rails console: ...@@ -78,7 +78,7 @@ The last option is to import a project using a Rails console:
gitlab-rails console gitlab-rails console
# For installations from source # For installations from source
sudo -u git -H bundle exec rails console RAILS_ENV=production sudo -u git -H bundle exec rails console -e production
``` ```
1. Create a project and run `Project::TreeRestorer`: 1. Create a project and run `Project::TreeRestorer`:
......
...@@ -42,7 +42,7 @@ gitlab-rails console ...@@ -42,7 +42,7 @@ gitlab-rails console
# Installation from source # Installation from source
cd /home/git/gitlab cd /home/git/gitlab
sudo -u git -H bin/rails console RAILS_ENV=production sudo -u git -H bin/rails console -e production
``` ```
Then run the following command to enable the feature flag: Then run the following command to enable the feature flag:
......
...@@ -947,7 +947,7 @@ backup beforehand. ...@@ -947,7 +947,7 @@ backup beforehand.
For installations from source: For installations from source:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole RAILS_ENV=production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
1. Check the `ci_group_variables` and `ci_variables` tables: 1. Check the `ci_group_variables` and `ci_variables` tables:
...@@ -982,7 +982,7 @@ backup beforehand. ...@@ -982,7 +982,7 @@ backup beforehand.
For installations from source: For installations from source:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole RAILS_ENV=production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
1. Clear all the tokens for projects, groups, and the whole instance: 1. Clear all the tokens for projects, groups, and the whole instance:
...@@ -1015,7 +1015,7 @@ backup beforehand. ...@@ -1015,7 +1015,7 @@ backup beforehand.
For installations from source: For installations from source:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole RAILS_ENV=production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
1. Clear all the tokens for pending jobs: 1. Clear all the tokens for pending jobs:
......
...@@ -16,7 +16,7 @@ To unlock a locked user: ...@@ -16,7 +16,7 @@ To unlock a locked user:
sudo gitlab-rails console -e production sudo gitlab-rails console -e production
## For installations from source ## For installations from source
sudo -u git -H bundle exec rails console RAILS_ENV=production sudo -u git -H bundle exec rails console -e production
``` ```
1. Find the user to unlock. You can search by email or ID. 1. Find the user to unlock. You can search by email or ID.
......
...@@ -277,7 +277,7 @@ gitlab-rails console ...@@ -277,7 +277,7 @@ gitlab-rails console
# Installation from source # Installation from source
cd /home/git/gitlab cd /home/git/gitlab
sudo -u git -H bin/rails console RAILS_ENV=production sudo -u git -H bin/rails console -e production
``` ```
Then run `Feature.enable(:approval_rules)` to enable the updated interface. Then run `Feature.enable(:approval_rules)` to enable the updated interface.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment