i would tell you to buy a bunch of books on php, html (in all its forms), sql, javascript, css, and all that, but why when you have ruby on rails?
ruby on rails is a web framework in which you write very little code and the rest is done by the framework.
Agile Web Development with Rails and Rails Recipes are good, but you may want to get a book on Ruby first. Ruby is not a web-specific language, its actually an object oriented scripting language. dont worry, most of the complicated stuff that Ruby provides will not be needed. Rails writes the code for you basically.