I'm attempting to install Ruby on Rails version 5.0.0 using Ruby 2.7.0 on Ubuntu. Executing any rake command (eg, "rake --tasks") results in a large number of messages about already initialized constants (Etc::VERSION, Etc::SC_AIO_LISTIO_MAX, etc.) followed by
rake aborted!
NameError: undefined method `extend_object' for class `Singleton'
Did you mean? extended
The answer to Error when running rake db:create: undefined method `extend_object' for class `Singleton' suggests removing Gemfile.lock and re-executing bundle install, but this had no effect for me. Are there other fixes?