I am working on a Twitter application to work with and Arduino board. All the application does is monitor a twitter account and check for new messages every 15 seconds. I had everything working until I decided that I want to post the code to GitHub. I moved all of my private configuration things (Application keys and user keys) into a Yaml file setup like the following:
app: oauth_consumer_token: consumertokenkey oauth_consumer_secret: consumersecretkey user: key: userkey secret: usersecret
Then to parse the file I used the following code as I found on some blogs:
require 'yaml' CONFIG = YAML::load_file("conf.yml")
Now when I run the code I get an error message:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 1, col 22: ` oauth_consumer_token: consumertokenkey' (ArgumentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:144:in `load_file' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `load_file' from twituino.rb:6
I can't seem to figure out what the actually syntax error is though after searching online for anything that might help.