Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Pedro Lucas Da Silva Cunha
Pedro Lucas Da Silva Cunha
5,276 Points

Need help with Ruby YAML

Hey I've been following along the Ruby track with Jason Seifer in the YAML section of the Ruby Standard Library. I'm stuck while making a file using this code: "File.open('.config.yml', 'w') do |config| config.puts hash.to_yaml end " Afterwards Jason checks if the file is created with the ls command and then checks its contents with the config.yml command. I'm not sure if it's because he's using a mac but the same commands aren't working in my command prompt (I'm using a windows machine). Anyone have any idea? Thanks.

2 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Pedro Cunha can you paste your full code here? Is there a file called ".config.yml" or is the first dot a typo?

Pedro Lucas Da Silva Cunha
Pedro Lucas Da Silva Cunha
5,276 Points

Looks like it was just a typo, it couldn't locate the file. Thanks for the help Jason. It was driving me insane.