Problems on Windows

I’ve downloaded the newest release of Typo onto both my mac and my
pc. Both have current versions of ruby and rails. The pc has the
latest version of mysql, I think my mac’s version is a release behind.

On both platforms, rake’s tests works, with a single error:

Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
Finished in 5.433574 seconds.

  1. Error:
    Errno::ENOENT: No such file or directory - /Users/riki/Downloads/

(I’m not too worried about this, I just include this in the interest
of completeness).

Anyway, launching Typo in webbrick, it works fine on the mac.
However, when I try to launch it in webbrick on the PC, I get syntax
errors. Even more oddly, the errors are not consistent. Remotely
viewing the pages from my mac (where I can cut and paste to my mail)
I get this:

SyntaxError in Accounts#signup

Showing app/views/layouts/accounts.rhtml where line #4 raised:

compile error
./script/…/config/…//app/views//./layouts/accounts.rhtml:4: Invalid
char `\003’ in expression
./script/…/config/…//app/views//./layouts/accounts.rhtml:6: syntax
_erbout.concat " Typo Administration: "
./script/…/config/…//app/views//./layouts/accounts.rhtml:7: syntax


Extracted source (around line #4):

6: Typo Administration: <%= controller.controller_name %></

Trace of template inclusion: /app/views/layouts/accounts.rhtml

RAILS_ROOT: ./script/…/config/…/

On the PC it will give different lines (sometimes #4, sometimes #5),
and slightly different error messages.

Any idea what’s going wrong? Or more importantly, how to fix it?



On 3/2/06, Rich W. [email protected] wrote:>>> SyntaxError in
Accounts#signup>> Showing app/views/layouts/accounts.rhtml where line #4
raised:>> compile error>
./script/…/config/…//app/views//./layouts/accounts.rhtml:4: Invalid>
char `\003’ in expression>
./script/…/config/…//app/views//./layouts/accounts.rhtml:6: syntax>
error> _erbout.concat " Typo Administration: ">
^> ./script/…/config/…//app/views//./layouts/accounts.rhtml:7: syntax>
error>> ^
I’d guess that something is corrupt, either your Ruby interpreter
oryour copy of Typo. Look at accounts.rhtml–is there a
controlcharacter on line 4? That’s what Ruby seems to be saying.


It looks like this has something to do with the line endings. I
opened accounts.rhtml in notepad and manually replaced all the line
endings. Now that page (at least) works.

I was thinking line endings might be a problem before posting the
question, but I couldn’t understand why the code portions seemed
fine, and only the views had problems (as indicated by the general
success of the test suite). Probably has something to do with how
rails parses the rhtml file.

So, does this mean I have to go through and change all the line
endings on all the views. What a pain.


I’m not sure what the problem was, but I took the app/view folder
over to my mac. There, I created a textfactory with bbedit to batch
change the files: changed line endings to dos, changed tabs to
spaces, zapped non-ascii characters (I think that’s it). I’m not sure
what fixed it (just changing the line endings alone didn’t seem to
work), but after importing these back to the windows box, everything
works fine.

I’ve downloaded several themes, and I’ve noticed that some work,
others don’t. I wonder if this is a bug in Rails or Typo. But clearly
something is not right.