Created
May 12, 2011 21:05
-
-
Save mkocher/969445 to your computer and use it in GitHub Desktop.
Requring psych before yaml, ruby-1.9.2-p180 on centos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p180 :006 > exit | |
[clients-user@ip-10-83-118-38 workspace]$ cd .. | |
[clients-user@ip-10-83-118-38 workspace]$ vi config | |
config/ config.ru | |
[clients-user@ip-10-83-118-38 workspace]$ vi config/ | |
application.rb cucumber.yml database.yml.example environments/ locales/ | |
boot.rb database.yml environment.rb initializers/ routes.rb | |
[clients-user@ip-10-83-118-38 workspace]$ vi config/database.yml.example | |
[clients-user@ip-10-83-118-38 workspace]$ irb | |
ruby-1.9.2-p180 :001 > require 'pp' | |
=> true | |
ruby-1.9.2-p180 :002 > require 'psych' | |
=> true | |
ruby-1.9.2-p180 :003 > require 'yaml' | |
=> true | |
ruby-1.9.2-p180 :004 > pp YAML.load_file('config/database.yml.example') | |
{"common"=> | |
{"adapter"=>"postgresql", | |
"username"=>"postgres", | |
"password"=>"password", | |
"host"=>"localhost"}, | |
"development"=> | |
{"adapter"=>"postgresql", | |
"username"=>"postgres", | |
"password"=>"password", | |
"host"=>"localhost"}} | |
=> {"common"=>{"adapter"=>"postgresql", "username"=>"postgres", "password"=>"password", "host"=>"localhost"}, "development"=>{"adapter"=>"postgresql", "username"=>"postgres", "password"=>"password", "host"=>"localhost"}} | |
ruby-1.9.2-p180 :005 > exit | |
[clients-user@ip-10-83-118-38 workspace]$ irb | |
ruby-1.9.2-p180 :001 > require 'pp' | |
=> true | |
ruby-1.9.2-p180 :002 > require 'yaml' | |
=> true | |
ruby-1.9.2-p180 :003 > require 'psych' | |
=> true | |
ruby-1.9.2-p180 :004 > pp YAML.load_file('config/database.yml.example') | |
{"common"=> | |
{"adapter"=>"postgresql", | |
"username"=>"postgres", | |
"password"=>"password", | |
"host"=>"localhost"}, | |
"development"=> | |
{"adapter"=>"postgresql", | |
"username"=>"postgres", | |
"password"=>"password", | |
"host"=>"localhost", | |
"database"=>"foo_dev"}} | |
=> {"common"=>{"adapter"=>"postgresql", "username"=>"postgres", "password"=>"password", "host"=>"localhost"}, "development"=>{"adapter"=>"postgresql", "username"=>"postgres", "password"=>"password", "host"=>"localhost", "database"=>"foo_dev"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the database key gets overwritten. something broke yaml.