# Ruby2Ruby

**URL:** <https://www.ruby-forum.com/t/ruby2ruby/171684>\
**Category:** Ruby\
**Created:** [July 7, 2009, 5:45pm UTC](https://www.ruby-forum.com/t/ruby2ruby/171684 "2009-07-07T17:45:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juston](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@Juston](https://www.ruby-forum.com/u/Juston)\
**Post date:** [July 7, 2009, 5:45pm UTC](https://www.ruby-forum.com/t/ruby2ruby/171684/1 "2009-07-07T17:45:35Z")

</div>

I’ve been reading a lot about ParseTree and Ruby2Ruby for a project  
I’m working on simply not getting it.

Im running 1.8.6 and have the Ruby2Ruby, ParseTree and ruby\_parser  
gems installed but I simply can’t get them to work. I suspect it might  
be that I may be using dated documentation. I’ve seen Ruby2Ruby used  
in a couple online tutorials and it usually works like this:

require “ruby2ruby”

class SomeClass  
…  
end

puts Ruby2Ruby.translate(SomeClass)

…and this would output the code for “SomeClass.” However for me it  
says method “translate” was not defined. I did some more searching and  
saw some alternative demos where you would call something like  
“SomeClass.to\_ruby” or “ParseTree.translate(SomeClass)” but I can’t  
get these to fly either. Any idea what I might be doing wrong?

Also, since ParseTree is actually borken on 1.9 (with no real plans to  
fix it) it seems using Ruby2Ruby and ruby\_parser would be a better  
idea, am I right about that? Thanks in advance for you input!
