Got undefined method 'parent' for nil:NilClass after `rails g mongoid:config`

In `app_name': undefined method `parent' for nil:NilClass (NoMethodError)