Adobe Flex (Flash Builder) + RubyAMF error
I develop applications using Adobe Flex and Ruby (through Ruby AMF plugin). The problem is that when I try to make a simple query from the data base I get an error caused by a UTF-8 char that comes from the db. The error is as follows.
RubyAMF >>>>>>>>> # took: 0.00011 secs RubyAMF >>>>>>>>> # took: 0.26820 secs incompatible character encodings: ASCII-8BIT and UTF-8 /Users/paito/work/banquet/server/vendor/plugins/rubyamf_plugin/io/read_write.rb:226:in
writen' 开发者_StackOverflow /Users/paito/work/banquet/server/vendor/plugins/rubyamf_plugin/io/amf_serializer.rb:219:in
write_amf3_string' /Users/paito/work/banquet/server/vendor/plugins/rubyamf_plugin/io/amf_serializer.rb:148:in `write_amf3'
My controller:
def list_posts
@posts = Post.all
respond_to do |format|
format.amf { render :amf => @posts }
end
end
Rails version: 3.0.7
Does anyone have a clue how I could get this solved? Thanks.
rubyamf_plugin doesn't fully support Rails 3 or Ruby 1.9. If you would like to use it, you'll need to go back to Rails 2 and Ruby 1.8. If you need to stay on Rails 3 and Ruby 1.9, https://github.com/warhammerkid/rails3-amf supports them but is missing many of the features that rubyamf_plugin includes.
精彩评论