# Tab characters with Rails 1.1 on Windows

**URL:** <https://www.ruby-forum.com/t/tab-characters-with-rails-1-1-on-windows/100922>\
**Category:** Rails\
**Created:** [August 1, 2006, 11:15pm UTC](https://www.ruby-forum.com/t/tab-characters-with-rails-1-1-on-windows/100922 "2006-08-01T23:15:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [August 1, 2006, 11:15pm UTC](https://www.ruby-forum.com/t/tab-characters-with-rails-1-1-on-windows/100922/1 "2006-08-01T23:15:49Z")

</div>

We just upgraded to Ruby 1.8.4 and Rails 1.1. It works fine on my Mac  
OSX, but in Windows, Rails spits out errors like “Invalid char `\002’ in  
expression”. Apparently, Ruby or Rails on Windows has a problem parsing  
tab characters. This seems to be a common problem:  
[http://softiesonrails.com/articles/2006/04/27/spaces-not-tabs](http://softiesonrails.com/articles/2006/04/27/spaces-not-tabs)

However, the only recommended solutions seems to be to replace all the  
tabs with spaces in your entire source tree. Is there a different  
solution? And does anyone know exactly why this is happening?

thanks,  
Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [August 2, 2006, 12:25am UTC](https://www.ruby-forum.com/t/tab-characters-with-rails-1-1-on-windows/100922/2 "2006-08-02T00:25:58Z")

</div>

I’d be interested to hear if there is an easy solution as well. I’ve  
just been using an automated find and replace to strip them all, but  
haven’t seen any documentation on a true solution yet…

Jeff C. wrote:

> We just upgraded to Ruby 1.8.4 and Rails 1.1. It works fine on my Mac  
> OSX, but in Windows, Rails spits out errors like “Invalid char `\002’ in  
> expression”. Apparently, Ruby or Rails on Windows has a problem parsing  
> tab characters. This seems to be a common problem:  
> [http://softiesonrails.com/articles/2006/04/27/spaces-not-tabs](http://softiesonrails.com/articles/2006/04/27/spaces-not-tabs)
> 
> However, the only recommended solutions seems to be to replace all the  
> tabs with spaces in your entire source tree. Is there a different  
> solution? And does anyone know exactly why this is happening?
> 
> thanks,  
> Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [August 2, 2006, 5:36pm UTC](https://www.ruby-forum.com/t/tab-characters-with-rails-1-1-on-windows/100922/3 "2006-08-02T17:36:34Z")

</div>

I received an email that sheds some light on this. Apparently, it has  
to do with RMagick and 1.8.4. Guess this thread should be on a  
different list, but I thought I’d follow up for those who might be  
effected:

Are you using RMagick? There is a known issue which causes the invalid  
character problem in the Rmagick port for windows when used with ruby  
1.84.  
This is causing me some headaches, too. In terms of fixes, per Kaspar,  
the  
developer for the Win32 port of RMagick, the earliest something will be  
ready is September. See the thread here:

[http://rubyforge.org/tracker/index.php?func=detail&aid=4036&group\_id=12&atid=133](http://rubyforge.org/tracker/index.php?func=detail&aid=4036&group_id=12&atid=133)

I’m currently exploring two avenues:

1 - Whether using mini\_magick will avoid this (I’m not sure whether  
minimagick uses rmagick under the hood)

Here is an example app with source by Geoffrey Grosenbach that uses  
MiniMagick. Again, don’t know if this avenue will be fruitful yet.  
[http://nubyonrails.com/pages/gullery](http://nubyonrails.com/pages/gullery)

2- Using IMLIB2, which I found out about from a gentleman named Doug  
Alcorn,  
whose blog is found here:

[http://blog.lathi.net/articles/category/ruby-on-rails/page/4](http://blog.lathi.net/articles/category/ruby-on-rails/page/4)

Doug emailed me some source. Since I only asked for myself, I don’t  
want to  
share his code without permission. If you ask nicely, maybe he’ll send  
it  
to you, or put it up on his blog as I’m sure others will run into this  
too.  
Feel free to post this info on the mailing list. I get the list in  
digest  
form, and for whatever reason, wasn’t able to get my posting to work, so  
I  
thought I’d email you directly. Thanks,

Eric B.
