unexpected local variable or method in varible Gitlab Omnibus
I have an install of Gitlab CE Omnibus installed on my raspberrypi4. I have gone into the config at /opt/gitlab/gitlab.rb to setup email for the install. When I did so (I also setup omniauth with azure at the same time), I get the following error.
Starting Chef Infra Client, version 15.14.0
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- package (0.1.0)
- gitlab (0.0.1)
- logrotate (0.1.0)
- postgresql (0.1.0)
- registry (0.1.0)
- redis (0.1.0)
- monitoring (0.1.0)
- letsencrypt (0.1.0)
- nginx (0.1.0)
- gitlab-kas (0.1.0)
- consul (0.1.0)
- mattermost (0.1.0)
- praefect (0.1.0)
- acme (4.1.1)
- gitlab-pages (0.1.0)
- gitaly (0.1.0)
- runit (5.1.3)
- crond (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
SyntaxError
-----------
/etc/gitlab/gitlab.rb:264: syntax error, unexpected local variable or method, expecting end-of-input
...ail will end up. Usually "inbox".
... ^~~~~
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:106:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:29:in `auto_vivify'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:106:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:22:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:
99:
100: def from_file(_file_path)
101: # Throw errors for unrecognized top level calls (usually spelling mistakes)
102: config_strict_mode true
103: # Turn on node deprecation messages
104: Gitlab::Deprecations::NodeAttribute.log_deprecations = true
105: # Allow auto mash creation during from_file call
106>> Gitlab::ConfigMash.auto_vivify { super }
107: ensure
108: config_strict_mode false
109: Gitlab::Deprecations::NodeAttribute.log_deprecations = false
110: end
111:
112: # Enhance set so strict mode errors aren't thrown as long as the setting is witin our defined config
113: def internal_set(symbol, value)
114: if configuration.key?(symbol)
115: configuration[symbol] = value
System Info:
------------
chef_version=15.14.0
platform=raspbian
platform_version=10
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [armv7l-linux-eabihf]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
/etc/gitlab/gitlab.rb:264: syntax error, unexpected local variable or method, expecting end-of-input
...ail will end up. Usually "inbox".
... ^~~~~
Running handlers complete
Chef Infra Client failed. 0 resources updated in 09 secondsLine 264 is
####! The mailbox where incoming mail will end up. Usually "inbox".
If I change line 264 to look like ####! The mailbox where incoming mail will end up. Usually inbox., I then get this error
Starting Chef Infra Client, version 15.14.0
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- postgresql (0.1.0)
- logrotate (0.1.0)
- gitlab (0.0.1)
- package (0.1.0)
- consul (0.1.0)
- redis (0.1.0)
- monitoring (0.1.0)
- gitlab-kas (0.1.0)
- registry (0.1.0)
- gitaly (0.1.0)
- praefect (0.1.0)
- nginx (0.1.0)
- mattermost (0.1.0)
- gitlab-pages (0.1.0)
- acme (4.1.1)
- runit (5.1.3)
- letsencrypt (0.1.0)
- crond (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
SyntaxError
-----------
/etc/gitlab/gitlab.rb:265: syntax error, unexpected local variable or method, expecting end-of-input
...g_email_mailbox_name'] = "inbox"
... ^~~~~
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:106:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:29:in `auto_vivify'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:106:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:22:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:
99:
100: def from_file(_file_path)
101: # Throw errors for unrecognized top level calls (usually spelling mistakes)
102: config_strict_mode true
103: # Turn on node deprecation messages
104: Gitlab::Deprecations::NodeAttribute.log_deprecations = true
105: # Allow auto mash creation during from_file call
106>> Gitlab::ConfigMash.auto_vivify { super }
107: ensure
108: config_strict_mode false
109: Gitlab::Deprecations::NodeAttribute.log_deprecations = false
110: end
111:
112: # Enhance set so strict mode errors aren't thrown as long as the setting is witin our defined config
113: def internal_set(symbol, value)
114: if configuration.key?(symbol)
115: configuration[symbol] = value
System Info:
------------
chef_version=15.14.0
platform=raspbian
platform_version=10
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [armv7l-linux-eabihf]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
/etc/gitlab/gitlab.rb:265: syntax error, unexpected local variable or method, expecting end-of-input
...g_email_mailbox_name'] = "inbox"
... ^~~~~
Running handlers complete
Chef Infra Client failed. 0 resources updated in 09 secondsLine 265 looks like # gitlab_rails['incoming_email_mailbox_name'] = "inbox"
Uncommenting 265 gives me the exact same error.
Gitlab version: GitLab Community Edition 13.9.2
Edited by minecraftchest1