http://edgeguides.rubyonrails.org/ - main documentation
Ruby on Rails is a web application framework built using Ruby.
Some of the code is straight Ruby, and some of it is a domain specific language for rails i.e. code that is meant to be used in a Rails web application, and might not work as expected in a Ruby script.