Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Check that database.yml is parsed properly (See related posts)

You can confirm that your database YAML file is being parsed properly with this one line shell command.

ruby -ryaml -e "File.open('config/database.yml') { |f| puts YAML.load(f).inspect }"

Comments on this post

nohmad posts on Jul 17, 2005 at 06:26
A little shorter version:

ruby -ryaml -e "p YAML.load(File.read('config/database.yml'))"

or

ruby -Iconfig -renvironment -e "p ActiveRecord::Base.connection"

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts