Invalid characters with win32

I’m running on webbrick 1.3.1, winxp, ruby 1.8.4, rails 1.1.6,
ferret-0.10.2-mswin32

Used gem install ferret - didn’t report any errors.

When I do a
require ‘ferret’
in any of my controllers actionview blows up with a

SyntaxError in Default#index
/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:307:in
`compile_and_render_template’

complaining about invalid characters.

Might be related/similar to this bug
http://www.ruby-forum.com/topic/62365

I ran the \ferret-0.10.2-mswin32\test\test_all.rb and everything looked
good.

Any ideas on this?

-ben

ben wrote:

I’m running on webbrick 1.3.1, winxp, ruby 1.8.4, rails 1.1.6,
ferret-0.10.2-mswin32

I’m running on the same, and am now getting weird errors on two separate
machines. Different errors than you’re getting, though.

compile error
./script/…/config/…/app/views/layouts/application.rhtml:58: parse
error, unexpected $, expecting kEND
_erbout.concat " <div class=“box” id=“desc”>\n"
^

What doesn’t make sense to me is that the errors are not even inside of
ruby scriptlets, they’re just in normal HTML parts of the view. And all
of my previous scriptlets are properly closed. If I mess around with the
layout by removing different parts of the html, I get different errors,
and then, randomly, some section of html being removed makes it work
again. Very, very odd behavior.

The SAME code (no messing around) running in my linux environment is
working fine.

If I remove acts_as_ferret from my model AND the filesystem, things
begin to work without any changes to the layout or other views.

I don’t get it. :confused: Maybe I’ll try downgrading to Ferret 0.10.2 Ruby
instead of win32 and see what happens.

Well, I tried to install 0.10.2 Ruby on windows, but that doesn’t work
since it tries to compile the C libs.

So I went back to 0.9.6 and aaf stable, and all is well again.

On 9/8/06, ben [email protected] wrote:

/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:307:in
`compile_and_render_template’

complaining about invalid characters.

Might be related/similar to this bug
Strange question on file_column - Rails - Ruby-Forum

I’d say it is definitely related to this. Which version of Ruby do you
have? I’ve compiled against 1.8.4 which isn’t the latest. Have you
tried the whitespace solution described here;

http://rails.techno-weenie.net/question/2006/3/26/how_do_i_get_file_column_plugin_working_on_windows_with_ruby_1_8_4

ie, replace all tabs with spaces. I have no idea why this would make a
difference but it seems to. I’ll puts out Ferret 0.10.3 today and I’ll
compile it against 1.8.5. Hopefully that will help.

Cheers,
Dave

David B. wrote:

I’d say it is definitely related to this. Which version of Ruby do you
have? I’ve compiled against 1.8.4 which isn’t the latest.

I’m on 1.8.4 here.

Have you tried the whitespace solution described here;

http://rails.techno-weenie.net/question/2006/3/26/how_do_i_get_file_column_plugin_working_on_windows_with_ruby_1_8_4

ie, replace all tabs with spaces.

I haven’t tried that yet, but I’ll give it a shot.

Ian.

David B. wrote:

I’ll puts out Ferret 0.10.3 today and I’ll
compile it against 1.8.5. Hopefully that will help.

I updated to 1.8.5 this morning. Any chance you put out 0.10.3?

-ben

fyi: if anyone’s interested… got Mongrel up and running this morning
and Mongrel + Ruby 1.8.5 + Ferret 0.10.2 = no joy, same wierd parsing
errors. So it doesn’t appear to be a webbrick thing at least. I tried
this because some of the posts above mentioned that using apache would
solve this issue… didn’t try that yet though (but was hoping simple
mongrel might solve it).

The problem I was having has been fixed by replacing tabs with spaces.

But, I did try updating to Ferret 0.10.4 and latest aaf trunk, and I was
still experiencing the same errors before I removed all tabs.