Problems on Windows


#1

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/
rake_test_loader
Started
…E…
Finished in 5.433574 seconds.

  1. Error:
    test_description(ThemeTest):
    Errno::ENOENT: No such file or directory - /Users/riki/Downloads/
    typo-2.6.0/config/…/test/mocks/themes/azure/about.markdown

(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
error
_erbout.concat " Typo Administration: "
^
./script/…/config/…//app/views//./layouts/accounts.rhtml:7: syntax
error

^

Extracted source (around line #4):

1:
3:
4:
5:
6: Typo Administration: <%= controller.controller_name %></
title>
7:

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?

Thanks,

-Rich-


#2

On 3/2/06, Rich W. removed_email_address@domain.invalid 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.

Scott


#3

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.

-Rich-


#4

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.

-Rich-