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 Basics Ruby Syntax Variables

fabio miguel da silva
fabio miguel da silva
1,147 Points

what am i doing wrong?

anguage = "Ruby" description = "awesome" puts language + description

variables.rb
language = "Ruby"
description = "awesome"
puts language + description

3 Answers

Travis Batts
Travis Batts
4,031 Points

Almost got it, try this.

language = "Ruby" description = "awesome"

puts language, description

missing that comma when defining two different arguments.

Moderator Edit: Moved response to Answers from Comments

Amir Tamim
Amir Tamim
8,597 Points

Hi Fabio, You code is correct, but it is missing a space between "Ruby" and "awesome." You can make it say "Ruby awesome" by doing: puts language + " " + description

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Hi Amir Tamim

(edited) Sorry, but you are partly incorrect in the interpretation of what the challenge is asking for, and Fabio's code is actually incorrect according to the instructions for the Challenge. Right now the compiler is adding the variables together, which is why you get the error in the challenge that states only "one variable is being passed in".
The challenge does not want nor ask for a space.

Puts (or Put String) in Ruby adds a new line after each parameter passed in to the method call, so the space is not needed nor asked for here.

puts language, description

will output

Ruby
awesome

Notice each one is on its own line, as expected by the challenge.
So, yes your code is syntactically correct, but Challenges are very picky and expect exactly what is asks for. Any deviation will always result in a Bummer!. Also, a challenge will not ask for something that has not been covered yet (and concatenation has not yet been covered).

:) :dizzy:

Amir Tamim
Amir Tamim
8,597 Points

Thanks for the correction, Jason Anders, If that is what the challenge asked for then yes :) I thought he needed to say "Ruby awesome" since he used concatenation. I guess users should always put in the full challenge question to avoid confusion :)