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 trialMark Bradshaw
Courses Plus Student 7,658 PointsNot sure how this question should be answered. Please advise
I understand how to create strings in ruby, but the way this question is being asked is a little confusing. Below is the question:
Fill in the blank below. Fill in the blank characters to create a valid Ruby string.
website = ________Treehouse________
so my string would look like this: string = <<-STRING Hello World! STRING
I can't get my string to work in the questions' layout.
5 Answers
Mark Bradshaw
Courses Plus Student 7,658 PointsThis is very helpful, but is the second blank where I add the hello.rb?
Stone Preston
42,016 PointsRuby strings are enclosed in quotes like so
"Treehouse"
so you would need to put 1 quotation mark in each blank
website = "Treehouse"
note that you can use either single or double quotes ie
"Treehouse"
or
'Treehouse'
but you can only use interpolation on strings enclosed in double quotes. so most of the time I just use double quotes
Mark Bradshaw
Courses Plus Student 7,658 PointsThis is very heloful, but after the treehouse blank do I add hello.rb?
Mark Bradshaw
Courses Plus Student 7,658 PointsFinally figured it out. I missed the simplicity of the question. Thanks.
Martina Carrington
15,754 PointsThanks Stone, this is very helpful .
Alp Eren Can
25,230 PointsHi Mark,
I think you are trying the multi-line syntax (Heredoc) for a single line string and that's the problem.
To make ________Treehouse________
a string in Ruby, you just need to put a single or a double quote character in those blanks and that's it.
Mark Bradshaw
Courses Plus Student 7,658 PointsI finally figured it out. Thanks for the assistance.
Will Lucas
3,043 PointsWow, this was an unnecessarily confusing question.
Mark Bradshaw
Courses Plus Student 7,658 PointsI eventually figure it out, but l felt the same way.
King Fola
5,327 Pointsheadline = "Website:_______Treehouse" What about this one?
Stone Preston
42,016 PointsStone Preston
42,016 Pointsall you need to add in the blanks are the quotes. nothing else.