# Wierd problem has stopped my whole site working

**URL:** <https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968>\
**Category:** Rails\
**Created:** [October 28, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968 "2006-10-28T17:09:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [October 28, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968/1 "2006-10-28T17:09:43Z")

</div>

This happened before whilst I was developing a site and never resolved  
itself. Something happens and all my pages return errors like this:

* * *

SyntaxError in Siteview#index

Showing app/views/siteview/index.rhtml where line #8 raised:

compile error  
./script/…/config/…/app/views/siteview/index.rhtml:8: syntax error  
./script/…/config/…/app/views/siteview/index.rhtml:9: syntax error  
./script/…/config/…/app/views/siteview/index.rhtml:10: syntax error

Extracted source (around line #8):

5: \<% elsif @team == nil and @team\_name == nil %\>  
6:

# Welcome
  
7: 

Please select the closest team to you for more information

  
8: 
  
9: 
## Point your mouse over a team to view more information
  
10: 
  
11: 

* * *

If I refresh the page it will come up with a slightly different error.  
Often with some:

./script/…/config/…/app/views/siteview/index.rhtml:8: Invalid char  
`\266’ in expression

(the invalid char number varying each time I refresh)

I am very puzzled by it and don’t really know where to start to look.  
From flicking around internet it seems its something to with how the  
server is running and perhaps how the end of line markers work.

The strange thing is the suddeness of it coming on, from everything  
working fine to it doing this on every page. There was no reset of the  
server involved, and when I did restart the server it didn’t make any  
difference.

I am using:  
ruby 1.8.4  
rails 1.1.6  
on a windows xp system

cheers

Nick

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [October 28, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968/2 "2006-10-28T17:15:48Z")

</div>

oh and I’m using the webrick server

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [October 28, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968/3 "2006-10-28T17:46:07Z")

</div>

A bit more searching and I found

> **[Tab Problem in rails .rhtml files](https://webonrails.wordpress.com/2006/08/10/tab-problem-in-rails-rhtml-files/)**
>
> The situation was: running Ruby 1.8.4, Rails 1.1.2, on WinXP & WEBrick server. My application was working fine, but as I installed Rmagick my application crashed. I got strange errors like: com…

which says the problem is about having tabs in rhtml (and possibly  
something to do with RMagick).

The solution is to put

template = template.gsub(/\t/," ")

in base.rb found in

{ruby base dir}\lib\ruby\gems\1.8\gems\actionpack-1.12.5\lib\action\_view

(or similar)

as the first line of the compile\_template function (line 499 on mine)

a restart of the server later and it is working

N

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [September 24, 2007, 11:41am UTC](https://www.ruby-forum.com/t/wierd-problem-has-stopped-my-whole-site-working/73968/4 "2007-09-24T11:41:16Z")

</div>

Thanks. it fixed my problem

I am not sure if it is because I have been starting to use Rmagick or  
that I  
have been messing with tab sizes in Eclipse or something else

a really annoying error

Peter
