Ruby on Rails Monday, November 1, 2010

MDM <don.mapp@...> writes:

>
> I am trying to find out why form_tag with remote => true is not
> sending an ajax response and only sending HTML. I have started a basic
> Rails App with two pages and am following the Railscast 205 UJS
> example. Every time I include:-
> <%= form_tag homepages_path, :method => 'get', remote => true do %>
> I get from the server(WEBrick):- (Ruby 1.9.2 and Rails 3)
> A 500 Internal server error
> Rendered homepages/index.html.erb within layouts/application (34.6ms)
> Completed in 52ms
> Error during failsafe response: incompatible encoding regexp match
> (UTF-8 regexp with ASCII-8BIT string)
> Plus lots more cleaner calls.
> In my complicated application the above form_tag sends the search in
> UTF-8
> Anyone has any ideas what is happening and how to solve the problem.
> As far as I know everything in the application is setup for UTF-8\
> Thanks in advance.
>

This error was obtained because I left off the ":" off the remote=>true. I
think, BUt after fixing that and getting the search working with html I am now
still getting this error and I believe it has something to do with the returned
values being in javascript.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment