# \[ANN\] rbeautify 0.0.3

**URL:** <https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721>\
**Category:** Ruby\
**Created:** [July 8, 2009, 7:43am UTC](https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721 "2009-07-08T07:43:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 8, 2009, 7:43am UTC](https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721/1 "2009-07-08T07:43:21Z")

</div>

ruby\_beautifier/code prettifier.

What it does:  
you run rbeautify ill-aligned code, like  
def go  
if 3  
end  
end

and it converts said file to

def go  
if 3  
end  
end

Quite convenient for those of us working on the command line. It also  
helps you find indentation mismatches [i.e. missing $end’s] by cleaning  
up the code so you can see where, and warning you where it sees a  
problem.

Many thanks to the original author [I just gemif-ied his existing script].

> **[\* Ruby Script Beautifier](https://arachnoid.com/ruby/rubyBeautifier.html)**
>
> A beautifier for Ruby source files ... written in Ruby.

Synopsis:  
gem sources -a [http://gems.github.com](http://gems.github.com)  
sudo gem install rogerdpack-rbeautify

rbeautify

Comments welcome.  
Thanks!  
=r

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 9, 2009, 10:06am UTC](https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721/2 "2009-07-09T10:06:20Z")

</div>

Thanks roger this promises to please me a lot

However the ri install fails on windows - ‘no such file or directory -  
lib’

I will feedback when i have used it!

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 9, 2009, 10:31am UTC](https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721/3 "2009-07-09T10:31:27Z")

</div>

Hi

sorry to say the gem doesn’t install properly on windows xp - although  
the file is there in the appropriate folder rubygems doesn’t know its  
there

also line 72 had a stray ’ so the rest of the file was seen as a string

- not sure I follow the code to know what is right there though

Hope this helps

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 9, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/ann-rbeautify-0-0-3/171721/4 "2009-07-09T18:09:43Z")

</div>

> However the ri install fails on windows - ‘no such file or directory -  
> lib’

Appears that older versions of ri didn’t my gem. I’ve uploaded a new  
version which has a dependency on a newer version of rdoc, which might  
help.

> sorry to say the gem doesn’t install properly on windows xp - although  
> the file is there in the appropriate folder rubygems doesn’t know its  
> there

Does it work now?

> also line 72 had a stray ’ so the rest of the file was seen as a string
> 
> - not sure I follow the code to know what is right there though

I assume that was a stray ’ in your own code? [If so remove it and  
re-run rbeautify 🙂 ]

Let me know if it doesn’t work.  
Thanks.  
=r
