rails api with mongodb raising exception for rails g command

I am developing a rails-api application using mongodb as database. The problem is each time i try rails generators,

It raises an exception in terminal :–

/user/.gem/ruby/gems/railties-5.1.3/lib/rails/application/configuration.rb:139:in database_configuration': Cannot loadRails.application.database_configuration`:
Could not load database configuration. No such file - [“config/database.yml”] (RuntimeError)

Since, i am using mongodb it does not requires database.yml file.