# Revision

**URL:** <https://www.ruby-forum.com/t/revision/131597>\
**Category:** IronRuby\
**Created:** [March 11, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/revision/131597 "2008-03-11T19:54:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [March 11, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/revision/131597/1 "2008-03-11T19:54:10Z")

</div>

I’ve checked out revision 76 of IronRuby, and finally got it setup in  
VS2008 where everything was compiling. For some reason the VS project  
file looks for the sub-projects in the wrong locations, and you have  
to redirect it to the proper project locations, and reset all the  
references.

I thought I would try to hack in a few more of the ruby string  
methods, and located the source file in the “MutableStringOps.cs” file  
in the IronRuby.Libraries project. I’ve written the code, but for  
some reason, it won’t get called. I’ve cleaned the solution, and  
built from scratch. I have a feeling I’m missing something obvious.  
I’ve continued to simplify it until now I have this:

```
    [RubyMethodAttribute("reverse", 

```

RubyMethodAttributes.PublicInstance)]  
public static MutableString/_!_/ Reverse(MutableString/_!_/  
self) {  
MutableString result = new MutableString(“reverse”); //just  
temp  
return result;  
}

When I try calling this method on a string from the ruby console, I  
get a NoMethodError. This is driving me crazy. I would really like  
to hack this together, and contribute it back, but I’m at my wits end  
here. It should work, but it’s not.

Sincerely,  
Josh

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [March 11, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/revision/131597/2 "2008-03-11T19:56:32Z")

</div>

Josh C.:

> I’ve checked out revision 76 of IronRuby, and finally got it setup in  
> VS2008 where everything was compiling. For some reason the VS project  
> file looks for the sub-projects in the wrong locations, and you have  
> to redirect it to the proper project locations, and reset all the  
> references.

You should use the _other_ solution in that directory - IronRuby.sln.  
That points to the right locations.

> self) {  
> MutableString result = new MutableString(“reverse”); //just  
> temp  
> return result;  
> }

You’ll need to run ‘rake gen’ from the command line to regenerate the  
Initializers.Generated.cs file.

-John

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [March 11, 2008, 8:09pm UTC](https://www.ruby-forum.com/t/revision/131597/3 "2008-03-11T20:09:32Z")

</div>

Or you can actually use the ClassInitGenerator.exe in your output  
directory directly:

classinitgenerator IronRuby.Libraries.dll Ruby.Libraries  
LibrariesInitalizer \> Initializer.Generated.cs

copy Initializer.Generated.cs to trunk/src/IronRuby.Libraries/

recompile.

I didn’t even know there was a rake task, I’ve been doing it like that  
from the start 😉 Still fighting to make the rake files play nice on  
Cygwin…  
On Tue, Mar 11, 2008 at 2:54 PM, John L. (DLR) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > ```
> > public static MutableString/*!*/ Reverse(MutableString/*!*/
> > 
> > ```
> 
> * * *
> 
> Ironruby-core mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
[Polymath Prokrammer]  
[http://blog.prokrams.com](http://blog.prokrams.com)

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [March 11, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/revision/131597/4 "2008-03-11T20:24:30Z")

</div>

Or more easily run GenerateInitializers.cmd from  
trunk\src\IronRuby.Libraries  
Pete

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [March 11, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/revision/131597/5 "2008-03-11T22:11:25Z")

</div>

John L. (DLR) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You should use the _other_ solution in that directory - IronRuby.sln. That points to the right locations.

Got it, thanks!

> You’ll need to run ‘rake gen’ from the command line to regenerate the Initializers.Generated.cs file.

I feel a bit foolish at the moment for not seeing that.

Never-the-less, I went ahead and implemented the string.reverse  
methods and submitted the patch to rubyforge. I don’t know how  
helpful that is specifically, but I hope to contribute more down the  
line.

Sincerely,  
Josh
