I was able to build foreman from source (https://github.com/theforeman/foreman.git -b 2.0-stable) with ruby2.7 and added the fix from above.
But now some gems throw a lot of warnings and i’m not sure, if i should bring this in our production environment so close to the weekend.
/opt/foreman/vendor/ruby/2.7.0/gems/graphql-1.8.17/lib/graphql/schema/mutation.rb:70: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/graphql-1.8.17/lib/graphql/schema/member/has_fields.rb:51: warning: The called method `field' is defined here
/opt/foreman/vendor/ruby/2.7.0/gems/graphql-1.8.17/lib/graphql/schema/mutation.rb:70: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/graphql-1.8.17/lib/graphql/schema/member/has_fields.rb:51: warning: The called method `field' is defined here
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:48: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1368: warning: The called method `has_many' is defined here
/opt/foreman/vendor/ruby/2.7.0/gems/scoped_search-4.1.8/lib/scoped_search/definition.rb:309: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/scoped_search-4.1.8/lib/scoped_search/definition.rb:27: warning: The called method `initialize' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:48: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1368: warning: The called method `has_many' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:53: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1821: warning: The called method `has_and_belongs_to_many' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:77: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1653: warning: The called method `belongs_to' is defined here
/opt/foreman/vendor/ruby/2.7.0/gems/scoped_search-4.1.8/lib/scoped_search/definition.rb:309: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/scoped_search-4.1.8/lib/scoped_search/definition.rb:27: warning: The called method `initialize' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:53: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1821: warning: The called method `has_and_belongs_to_many' is defined here
/opt/foreman/app/models/concerns/has_many_common.rb:77: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/foreman/vendor/ruby/2.7.0/gems/activerecord-5.2.1/lib/active_record/associations.rb:1653: warning: The called method `belongs_to' is defined here