Rake error at installation

I have a problem when installing the database of Zammad by the rake command, and I need some assistance, perhaps someone can point out how to fix this.

When I try to run ‘rake db:create’ I get the following error:

rake aborted!

SyntaxError: /opt/zammad/lib/tasks/zammad/db/reset.rake:17: syntax error, unexpected keyword_ensure, expecting keyword_end

ensure

^

/opt/zammad/lib/tasks/zammad/db/reset.rake:27: syntax error, unexpected keyword_end, expecting end-of-input

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/engine.rb:650:in `block in run_tasks_blocks’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/engine.rb:650:in `each’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/engine.rb:650:in `run_tasks_blocks’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/application.rb:515:in `run_tasks_blocks’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/engine.rb:459:in `load_tasks’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/railtie.rb:190:in `public_send’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.2.3/lib/rails/railtie.rb:190:in `method_missing’

/opt/zammad/Rakefile:7:in `’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency’

/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load’

(See full trace by running task with --trace)

I had to upgrade to ruby-2.5.5 in order to install zammad-3.1.0

Please provide the needed information from our template, as with the above information it’s impossible to help you correctly. For now I expect you to use Zammad 3.1.x which requires ruby 2.5.5 as stated here: https://docs.zammad.org/en/latest/prerequisites-software.html

The template information needed:

 * Used Zammad version: 
* Used Zammad installation source: (source, package, ...)
* Operating system: 
* Browser + version: 

Thank you. Updating Ruby to version 2.5.5 did it.