Check out example codes for "FATAL: database does not exist rails". It will help you in understanding the concepts better.

Code Example 1

rake db:create:all 
rake db:migrate

Learn ReactJs, React Native from akashmittal.com