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:
compile error /script/../config/../app/views/layouts/application.rhtml:18: parse error, unexpected $, expecting kEND
if I refresh again the error actually changes(further refreshes flip back & forth between errors):
compile error
/script/../config/../app/views/layouts/application.rhtml:18: Invalid char `01′ in expression
./script/../config/../app/views/layouts/application.rhtml:19: parse error, unexpected tCONSTANT, expecting kEND
./script/../config/../app/views/layouts/application.rhtml:20: parse error, unexpected tCONSTANT, expecting kEND
./script/../config/../app/views/layouts/application.rhtml:21: Invalid char `06′ in expression
./script/../config/../app/views/layouts/application.rhtml:21: parse error, unexpected $, expecting kEND
Then my colleagues told me the root of this problem, this was because of tabs in .rhtml files. Also they told me the simple solution:
Put template = template.gsub(/\t/, ” “) in your
\vendor\rails\actionpack\lib\action_view\base.rb file at line 496 as very first line of def compile_template
Restart webserver and you are done….
I have the same problem. I can’t solve it in that way, but the bug is only on windows. In linux i have no problems.
I have similar problem in generators, but i put
ERB.new(file.read.gsub(/\t/, ” “), nil, ‘-‘).result(b)
in line 277 of file \ruby\lib\ruby\gems\1.8\gems\rails-1.1.6\lib\rails_generator\commands.rb
This problem with rmagick should be solved by the latest version. Tabs should not be a problem for rails. The download, I believe, for the RMagick version with the fix is now up on RubyForge. Take care.
I had the same problem on windows.
Thanks for the solution:)
Hi all!
Hi! I found lots of intresting things here, very nicely done.