At first I would use http://ruby.railstutorial.org/.
And database.yml is place where you put setup for database your application use - username, password, host - for each database. With new application you dont need to change anything - simply use default sqlite setup.