Backtrace: ./script/../config/../app/views/story/_showing_tags.rhtml:4:in `compile_template'
I just made a bad experience with ruby I would like to share.
I wanted to upgrade my SuSE Linux 9.1 to version 10. Failed… during the upgrade process my machine ended up in a strange state. I was not able to boot neither from hard drive nor from Windows XP installation disk. I had to use my old Win 2000 installation CD to make it running.
As a consequence, I had to recreate the whole development environment. After few hours of work I started my application…
Before the installation it was running without any problem. After the environment was recreated, I was not able to render some views. It showed me strange syntax errors:
ActionView::TemplateError (compile error
./script/../config/../app/views/story/_showing_tags.rhtml:4: syntax error
_erbout.concat " "
^) on line #4 of app/views/story/_showing_tags.rhtml:
_erbout.concat " "; end ; _erbout.concat "\n"
In fact, the rails were complaining about the tabs before the embedded ruby commands
After changing the tabs to 2 spaces the application started… complaining about another characters.
I did some research and I was pointed to a ruby version. Before the reinstallation I was running 1.8.2. After the installation I took the latest one. Bad decision. It was caused by the ruby interpreter version.
So, if you face weird syntax errors with ruby 1.8.4 and you are sure about the syntax, try to change the version. I downgraded to 1.8.2 and it started to work again.