ruby is a language. It has multiple implementations, but there is one reference implementation known as either MRI (Matz's ruby interpreter) or C-Ruby (because it's written in C). There is also a ruby specification project in progress, which attempts to document how ruby should behave rather than just "do what MRI does".
There are also multiple versions of ruby, 1.8.7 and 1.9.1 being the most commonly found these days.
With that being said, the goal of all implementations (including JRuby, Ironruby, Rubinius) is to be compliant with the spec, and therefore compatible. So you can write your "pure" ruby code and run it on whatever implementation is best.
Of course, different implementations have their own bugs, and their own level of compliance with the spec. And that is what you need to watch out for.