Topic: Hod do I allow puts to show html.

I am very new to rails, I have a couple gets statements that takes the variable and puts it within an html template that i want to puts onto the screen. Except when I run it (radrails) I get a mess of errors involving my HTML code. withing the puts. here is an example.

puts "What is the title of this ebay item?"
item_title = gets

puts "<html><a href="">" + item_title + "</a>"

I get alot of these errors..

file.rb:26: syntax error, unexpected tIDENTIFIER, expecting $end
puts "<CENTER><IMG src=""> </CENTER><BR>

Im sure its a rookie mistake but I cant find anything about the puts showing HTML code that people and copy paste. Any ideas?

Re: Hod do I allow puts to show html.

You have nested quotes everywhere.  You need to escape quotes (\") that you want to be part of the output.
I.e., puts "<a href=\"\">...</a>"

Re: Hod do I allow puts to show html.

Yep, just figured that out and I now have my first working script that will save me tons of time on posting things on ebay.

1 day into learning ruby and already it has paid off!

On to more challenging tasks.

Thanks by the way!