warhammerkid / rocket-amf Goto Github PK
View Code? Open in Web Editor NEWThis project forked from thillerson/rubyamf
A fast AMF serializer/deserializer and request/response wrappers
Home Page: https://github.com/rubyamf/rocketamf
This project forked from thillerson/rubyamf
A fast AMF serializer/deserializer and request/response wrappers
Home Page: https://github.com/rubyamf/rocketamf
Hi,
I get this error:
NameError: uninitialized constant RocketAMF::Pure::AMF3Serializer::StringIO
from /Users/usr/.rvm/gems/ruby-1.9.2-p180@def/gems/RocketAMF-0.2.1/lib/rocketamf/pure/serializer.rb:164:in serialize' from /Users/usr/.rvm/gems/ruby-1.9.2-p180@def/gems/RocketAMF-0.2.1/lib/rocketamf.rb:109:in
serialize'
from (irb#1):6
when I do:
require 'rocketamf'
hash = {:apple => "Apfel", :red => "Rot", :eyes => "Augen"}
RocketAMF.serialize(hash, 3)
It seems I had to do:
require 'stringio'
HTH.
I've got the following message when trying to serialize an ActiveRecord object.
NoMethodError Exception: undefined method `gcd' for -3.291294892032e+26:Float
When doing a single HTTP request which calls multiple services/actions (i.e. the Body of the request has multiple flex.messaging.messages.RemotingMessage items) and calling
RocketAMF::Envelope.new.populate_from_stream(request.raw_post)
I get the error:
reading 24948 bytes is beyond end of source: 2719 (pos), 6440 (size)
This is when using the C deserializer.
Hi,
I have following models:
class C1 < ActiveRecord::Base has_many :c2s, :include =>> :c3s end
class C2 < ActiveRecord::Base belongs_to :c1 has_many :c3s end
class C3 < ActiveRecord::Base belongs_to :c2 end
In my Controller I am doing the following:
...... @c1s = C1.find(:all, :include => [:c2s] ) logger.debug "**********: #{@c1s[0].c2s[0].c3s}" respond_with(@c1s) do |format| format.amf { render :amf => @c1s.to_amf(:include => [:c2s] ) } end ....
In my Logfile I can find the correct Output from the logger, but the respond_with block is sending back all c1s with the nested c2s - but NO c3s.
I tried a lot, but had no reasonable result. Is there something wrong with the deserialization - or is there another way getting back all three levels of objects ?
Thanks and Regards
Chris
Without native extension, running simple example in README will fail with error: lib/rocketamf/pure/serializer.rb:164:in 'serialize': uninitialized constant RocketAMF::Pure::AMF3Serializer::StringIO (NameError)
This can be fixed by doing: require 'stringio'
in the host application, but should probably be added to files which need it.
What about deseralized classes that implements IExternalizable interface in flash?
I.e. i got from Flash, class that implement IExternalizable, and have its own readExternal / writeExternal methods.
In pre-"[de]serializers using C" i just added obj.prepare(source, self) if obj.respond_to?(:prepare)
to deserializer.rb @ line near 379 (inside if traits[:externalizable]
block)
Ignore...some of us are still learning to use Github :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.