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 Ruby Loops Ruby Loops Loop Conditionals

Errno::ENOENT: No such file or directory @ rb_sysopen - 1

I have received this message when clicking to check work, Errno::ENOENT: No such file or directory @ rb_sysopen - 1. After researching what it might be, I found that it refers to as it states, a missing file. Is the required function on the test side missing or given a different name?

loop.rb
# Assume get_answer() is already defined

loop do 
  print "What is the answer? "
  answer = gets.chomp
  if answer == e
    break
  end 
end

1 Answer

You just need to set answer to the get_answer and then set your break case and be sure to use the string "e"

Assume get_answer() is already defined

loop do 

 answer = get_answer

  if answer == "e"

    break

  end

end