# Is there a ruby source code formatter?

**URL:** <https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954>\
**Category:** Ruby\
**Created:** [June 27, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954 "2007-06-27T20:40:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 27, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954/1 "2007-06-27T20:40:17Z")

</div>

Is there a ruby source code formatter somewhere out there?

My ruby code is looking pretty terrible as I chop and change here and  
there to get the code to work right.

Something that can take a ruby file and output another file will be  
great.

Frank

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 27, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954/2 "2007-06-27T22:10:53Z")

</div>

On Jun 27, 12:40 pm, Frank C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a ruby source code formatter somewhere out there?
> 
> My ruby code is looking pretty terrible as I chop and change here and  
> there to get the code to work right.
> 
> Something that can take a ruby file and output another file will be  
> great.

You can find some answers to this in the first handful of links at:  
[http://www.google.com/search?q=ruby+source+code+formatter](http://www.google.com/search?q=ruby+source+code+formatter)

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 27, 2007, 10:12pm UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954/3 "2007-06-27T22:12:53Z")

</div>

I dont believe there is one out there, at least my google search drew a  
naught.

I also want a ruby code formatter, though for a different reason as I do  
a  
lot of automatic code generation and it will be nice to run the code  
through  
a formatter to make it human friendly.

If non extsts then I am thinking of doing one myself and make it  
available  
to others.

- Nasir

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 28, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954/4 "2007-06-28T14:56:27Z")

</div>

On Jun 27, 2:40 pm, Frank C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a ruby source code formatter somewhere out there?

I’ve been using [\* Ruby Script Beautifier](http://www.arachnoid.com/ruby/rubyBeautifier.html)

Its a Ruby script, so you can make adjustments if the default isn’t to  
your liking  
Also easy to add as a tool to the various editors/IDEs I’ve been  
playing with

Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 28, 2007, 8:17am UTC](https://www.ruby-forum.com/t/is-there-a-ruby-source-code-formatter/107954/5 "2007-06-28T08:17:35Z")

</div>

[http://rubyforge.org/projects/tiddy/](http://rubyforge.org/projects/tiddy/) looks nice though not actively  
maintained.
