Ruby Forum Ferret > invalid characters with win32

Posted by ben (Guest)
on 07.09.2006 20:44
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
Posted by Ian Zabel (ianzabel)
on 08.09.2006 04:18
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. :/ Maybe I'll try downgrading to Ferret 0.10.2 Ruby 
instead of win32 and see what happens.
Posted by Ian Zabel (ianzabel)
on 08.09.2006 05:03
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.
Posted by David Balmain (Guest)
on 08.09.2006 05:16
(Received via mailing list)
On 9/8/06, ben <wiseleyb@gmail.com> 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
> http://www.ruby-forum.com/topic/62365

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
Posted by Ian Zabel (ianzabel)
on 08.09.2006 06:41
David Balmain 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.
Posted by ben (Guest)
on 08.09.2006 15:38
David Balmain 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

Posted by ben (Guest)
on 08.09.2006 18:02
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).

Posted by Ian Zabel (ianzabel)
on 11.09.2006 21:29
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.