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 load
Rails.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.
Expected behavior
It should execute rails g scaffold article2 name:string content:text
command without any error.
Actual behavior
Right now it is raising the exception
/user/.gem/ruby/gems/railties-5.1.3/lib/rails/application/configuration.rb:139:in database_configuration': Cannot load
Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"] (RuntimeError)
System configuration
Rails version: 5.1.3
Ruby version: 2.4.1
And hence, i want to ask how to solve this problem!!
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/47b4ad0b-7b95-47d5-aa99-97a1b666db3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment