JavaScript: http://eloquentjavascript.net/ (I recommend the interactive HTML version). Ruby: http://mislav.uniqpath.com/poignant-guide/
If I were to begin programming with the goal of working in the web today, I would love that someone pointed me to any of these 3 resources.
Like I said there are other beginner books and online tutorials using languages that aren't usual for the web like The Little Schemer (Scheme). It's always a plus.
You'll need to learn to use a good text editor or an IDE. I'm biased toward Vim, it takes time, but it's a good investment.
You'll need to learn HTML and some CSS. There are countless lists of recommendations out there for best books on x. Just checkout StackOverflow with similar queries for JavaScript, CSS and HTML. e.g. http://blog.reybango.com/2010/12/15/what-to-read-to-get-up-t...
You'll need to learn to interact with databases. You'll need to learn some SQL. However, I've been doing this for quite some time and I've only recently been playing with document oriented databases (aka NoSQL), it is my opinion that there are very few situations where they might not be suitable. Seeing that nothing prevents you from mixing solutions (SQL + NoSQL), I would frankly recommend to a beginner to invest in NoSQL first. Redis, MongoDB, CouchDB are the NoSQL DBs I've played with and would recommend.