Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.