My favorites | Sign in
Logo
                
Details: Show all Hide all

Last 7 days

  • Dec 16, 2009
    issue 123 (Serialization issues with DateTime properties) reported by simon.faust   -   What steps will reproduce the problem? 1. Create a model object with timestamp properties 2. return them via amf What is the expected output? What do you see instead? The serialisation fails with: >>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::RailsInvokeAction:0x7f41ccac01d8> took: 0.20800 secs undefined method `to_i' for Tue, 15 Dec 2009 15:59:12 +0000:DateTime /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/time_with_zone.rb:262:in `hash' In amf_serializer.rb the method write_amf3_date(datetime) calls store_object(obj). I guess the store_object involves hashCode or something similar internally to place the object into the Hash. That also seems to involve a call to_i on the obj, but to_i is not present for DateTime. What version of the product are you using? On what operating system? rails 2.3.4,ruby 1.8.6, ruby amf 1.6.5, ubuntu 9.10 Please provide any additional information below.
    What steps will reproduce the problem? 1. Create a model object with timestamp properties 2. return them via amf What is the expected output? What do you see instead? The serialisation fails with: >>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::RailsInvokeAction:0x7f41ccac01d8> took: 0.20800 secs undefined method `to_i' for Tue, 15 Dec 2009 15:59:12 +0000:DateTime /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/time_with_zone.rb:262:in `hash' In amf_serializer.rb the method write_amf3_date(datetime) calls store_object(obj). I guess the store_object involves hashCode or something similar internally to place the object into the Hash. That also seems to involve a call to_i on the obj, but to_i is not present for DateTime. What version of the product are you using? On what operating system? rails 2.3.4,ruby 1.8.6, ruby amf 1.6.5, ubuntu 9.10 Please provide any additional information below.

Last 30 days

  • Dec 10, 2009
    Installation Wiki page commented on by barmalei4ik   -   could you give example how to use this plugin from simple ruby application?
    could you give example how to use this plugin from simple ruby application?
  • Nov 30, 2009
    issue 122 (nil.include? bug) reported by pabloifran   -   I installed the plugin to do a test application and when I create an object with null values the plugin serializes the object and then it throws the exception: nil.include? I saw the code and found i != nil # I think this should be i.nil? When I changed that in every place I found it, the code worked just fine. You can find attached the class with my changes
    I installed the plugin to do a test application and when I create an object with null values the plugin serializes the object and then it throws the exception: nil.include? I saw the code and found i != nil # I think this should be i.nil? When I changed that in every place I found it, the code worked just fine. You can find attached the class with my changes
  • Nov 30, 2009
    issue 121 (nil.include? bug) reported by pabloifran   -   I installed the plugin to do a test application and when I create an object with null values the plugin serializes the object and then it throws the exception: nil.include? I saw the code and found i != nil # I think this should be i.nil? When I changed that in every place I found it, the code worked just fine. You can find attached the class with my changes
    I installed the plugin to do a test application and when I create an object with null values the plugin serializes the object and then it throws the exception: nil.include? I saw the code and found i != nil # I think this should be i.nil? When I changed that in every place I found it, the code worked just fine. You can find attached the class with my changes
  • Nov 24, 2009
    issue 120 (Impossible to update an existing activerecord object) reported by jzienkiewicz   -   What steps will reproduce the problem? 1. Use RESTful controllers (scaffolding) 2. Configure class mappings 3. Send an object that maps to an existing activerecord object via AMF What is the expected output? What do you see instead? An object with several changed attributes is being sent over AMF. In params [0] I get an object that is impossible to save - @vo.save returns true, but does not trigger an UPDATE statement. No attributes seem to be changed in @vo. When some attribute is assigned a new value before calling .save, it triggers an UPDATE statement for that attribute only. What version of the product are you using? On what operating system? RubyAMF 1.6.5, jruby 1.4.0, rails 2.3.4 on Windows Vista (64-bit) Please provide any additional information below. Investigating the problem showed that Vo.new was called instead of Vo.find, so it seems that RubyAMF incorrectly considers the incoming object to be a new record instead of an updated one.
    What steps will reproduce the problem? 1. Use RESTful controllers (scaffolding) 2. Configure class mappings 3. Send an object that maps to an existing activerecord object via AMF What is the expected output? What do you see instead? An object with several changed attributes is being sent over AMF. In params [0] I get an object that is impossible to save - @vo.save returns true, but does not trigger an UPDATE statement. No attributes seem to be changed in @vo. When some attribute is assigned a new value before calling .save, it triggers an UPDATE statement for that attribute only. What version of the product are you using? On what operating system? RubyAMF 1.6.5, jruby 1.4.0, rails 2.3.4 on Windows Vista (64-bit) Please provide any additional information below. Investigating the problem showed that Vo.new was called instead of Vo.find, so it seems that RubyAMF incorrectly considers the incoming object to be a new record instead of an updated one.
  • Nov 23, 2009
    Installation Wiki page commented on by alainbloch   -   this plugin can be used with any ruby application.
    this plugin can be used with any ruby application.

Earlier this year

  • Oct 26, 2009
    r1320 (fixed an issue with class mappings that would not allow migr...) committed by and...@gladhandle.com   -   fixed an issue with class mappings that would not allow migrations to run when a class mapping pointed at an invalid rails model, fixed an issue that would not allow a property to be mapped between rails and flex when it had a number in it. eg: addressLine1
    fixed an issue with class mappings that would not allow migrations to run when a class mapping pointed at an invalid rails model, fixed an issue that would not allow a property to be mapped between rails and flex when it had a number in it. eg: addressLine1
  • Oct 08, 2009
    issue 119 (Classmappings.register is not converting model to its VO. bu...) reported by jijo.thomas   -   Hi! I am new to rails and rubyamf. I just installed the latest version of the rubyamf plugin. My problem is that when I set ClassMappings.assume_types=true, I get VOs of the types that I declared in flex from the server. But when I set ClassMappings.assume_type=false and use the ClassMappings.register, the models don't get converted to corresponding VOs. I am working on Windows XP. Rails version is 2.3.2. Here is my rubyamf_config.rb file. ClassMappings.translate_case = true ClassMappings.force_active_record_ids = true ClassMappings.assume_types = false ClassMappings.register( :actionscript => 'org.siht.framework.vo.ItemVO', :ruby => 'Item', :type => 'active_record', :associations => ["item_type"], :attributes => ["id", "label", "description", "price", "item_type_id", "created_at", "updated_at"]) ClassMappings.register( :actionscript => 'org.siht.framework.vo.ItemTypeVO', :ruby => 'ItemType', :type => 'active_record', :attributes => ["id", "label", "created_at", "updated_at"]) ClassMappings.use_array_collection = true Following are the corresponding AS3 VO's that I have defined. package org.siht.framework.vo { import com.adobe.cairngorm.vo.IValueObject; [RemoteClass(alias='Item')] public class ItemVO implements IValueObject { public var id : Number; public var label : String; public var description : String; public var price : Number; public var itemTypeId : Number; public var createdAt : Date; public var updatedAt : Date; } } package org.siht.framework.vo { import com.adobe.cairngorm.vo.IValueObject; [Bindable] [RemoteClass(alias="ItemType")] public class ItemTypeVO implements IValueObject { public var id:Number; public var label : String; public var items : Array; public var createdAt : Date; public var updatedAt : Date; } } Entry in my services.mxml file. <mx:RemoteObject id="itemService" destination="rubyamf" source="ItemsController" /> I have attached services-config.xml file too. As I told before, if I use ClassMappings.assume_types=true I get an arraycollection of ItemVOs when I do a fetch on them. But I get only objects of type Object when I set ClassMappings.assume_types=false and use the ClassMappings.register configuration mentioned above.
    Hi! I am new to rails and rubyamf. I just installed the latest version of the rubyamf plugin. My problem is that when I set ClassMappings.assume_types=true, I get VOs of the types that I declared in flex from the server. But when I set ClassMappings.assume_type=false and use the ClassMappings.register, the models don't get converted to corresponding VOs. I am working on Windows XP. Rails version is 2.3.2. Here is my rubyamf_config.rb file. ClassMappings.translate_case = true ClassMappings.force_active_record_ids = true ClassMappings.assume_types = false ClassMappings.register( :actionscript => 'org.siht.framework.vo.ItemVO', :ruby => 'Item', :type => 'active_record', :associations => ["item_type"], :attributes => ["id", "label", "description", "price", "item_type_id", "created_at", "updated_at"]) ClassMappings.register( :actionscript => 'org.siht.framework.vo.ItemTypeVO', :ruby => 'ItemType', :type => 'active_record', :attributes => ["id", "label", "created_at", "updated_at"]) ClassMappings.use_array_collection = true Following are the corresponding AS3 VO's that I have defined. package org.siht.framework.vo { import com.adobe.cairngorm.vo.IValueObject; [RemoteClass(alias='Item')] public class ItemVO implements IValueObject { public var id : Number; public var label : String; public var description : String; public var price : Number; public var itemTypeId : Number; public var createdAt : Date; public var updatedAt : Date; } } package org.siht.framework.vo { import com.adobe.cairngorm.vo.IValueObject; [Bindable] [RemoteClass(alias="ItemType")] public class ItemTypeVO implements IValueObject { public var id:Number; public var label : String; public var items : Array; public var createdAt : Date; public var updatedAt : Date; } } Entry in my services.mxml file. <mx:RemoteObject id="itemService" destination="rubyamf" source="ItemsController" /> I have attached services-config.xml file too. As I told before, if I use ClassMappings.assume_types=true I get an arraycollection of ItemVOs when I do a fetch on them. But I get only objects of type Object when I set ClassMappings.assume_types=false and use the ClassMappings.register configuration mentioned above.
  • Sep 30, 2009
    issue 118 (server does not start when models use methods implemented by...) reported by reiner.p...@neofonie.de   -   What steps will reproduce the problem? 1. Use a validation plugin like the validates_timeliness plugin (http://github.com/adzap/validates_timeliness) 2. Create a model that uses e.g. the "validates_date" validator. 3. Create a class mapping for the model in rubyamf config. 2. Try to start the server with script/server. What is the expected output? What do you see instead? I expect the server to start. Instead, I get the error "`method_missing': undefined method `validates_date'", obviously caused by RubyAMF that cannot register the class type. What version of the product are you using? On what operating system? RubyAMF 1.6.5 Rails 2.3.3 ruby 1.8.7 (2009-06-12 patchlevel 174) OS X 10.6
    What steps will reproduce the problem? 1. Use a validation plugin like the validates_timeliness plugin (http://github.com/adzap/validates_timeliness) 2. Create a model that uses e.g. the "validates_date" validator. 3. Create a class mapping for the model in rubyamf config. 2. Try to start the server with script/server. What is the expected output? What do you see instead? I expect the server to start. Instead, I get the error "`method_missing': undefined method `validates_date'", obviously caused by RubyAMF that cannot register the class type. What version of the product are you using? On what operating system? RubyAMF 1.6.5 Rails 2.3.3 ruby 1.8.7 (2009-06-12 patchlevel 174) OS X 10.6
  • Sep 24, 2009
    Installation Wiki page commented on by pjwalker   -   What if we are not using rails? It's a shame if this project can only be used from rails...
    What if we are not using rails? It's a shame if this project can only be used from rails...
  • Aug 26, 2009
    issue 117 (Binary data serialized as a string instead of bytearray) reported by Marty.Picco   -   What steps will reproduce the problem? 1. create active record with a :binary attribute 2. create a VO in Flex declaring attribute as ByteArray What is the expected output? What do you see instead? Byte array should be loaded with binary data. Instead, it is null. If the VO declares it as a string, the data is there but terminates at the first \0. The binary data is on the wire, verified by Wireshark. What version of the product are you using? On what operating system? Rails 2.3.3. Ruby 1.8.6 rubyAMF 1.6.5 Flex 3 Please provide any additional information below. Here's an email thread discussing the problem: Hey, you're right, this is a bug, I've been doing some test and I find that binary data is being serialized to strings instead of bytearrays. Please, could you fill up a new issue in the bugtracker, with the details in this email? so we can keep up the work about this. I think it's a serious issue, it's probably that it'll be fixed in the next release. Thank you On Fri, Aug 21, 2009 at 8:08 PM, martypicco <marty@picco.org> wrote: Hi, I'm trying to use rubyAMF to load images from a database with no success. I have a class Artifact that represents a file on the server. When an artifact is read or written in Rails, I use the after_initialize and before_save callbacks to load/save the payload data from/to the referenced file. This way when the Flex client gets the entire artifact in one load. The payload attribute holds the file data. When I declare this to be a String in my VO, everything works fine as long as the file being referenced is text (e.g. XML); but if the file is binary (e.g. PNG) then the payload is truncated at the first zero (no real surprise there). When I declare the payload to be a ByteArray in Flex, I get a null payload no matter what's in the file. I've verified that the data is sent from rails using Wireshark. I've searched high and low but can't find any reference to how to properly handle binary data using rubyAMF. I see some references using PHP etc., but nothing for Ruby. Any ideas? I am completely stuck at the moment. Thanks, Marty Artifact schema in Rails: create_table "artifacts", :force => true do |t| t.integer "pubdoc_id" t.string "filename" t.string "format" t.datetime "created_at" t.datetime "updated_at" t.binary "payload" end My class mapping in rubyamf.cfg: ClassMappings.register( :actionscript => 'Artifact', :ruby => 'Artifact', :type => 'active_record', :attributes => ["id","pubdoc_id","filename","format","payload","created_at","updated_at"]) My VO in Flex: [Bindable] [RemoteClass(alias="Artifact")] public class Artifact { // attributes public var id:int; public var pubdocId:int; public var filename:String; public var format:String; public var createdAt:Date; public var updatedAt:Date; public var payload:String; // using ByteArray doesn't seem to work... [Transient] public var artifactLoaded:Boolean; [Transient] public var artifacts:ArrayCollection; } -- www.victorcoder.com
    What steps will reproduce the problem? 1. create active record with a :binary attribute 2. create a VO in Flex declaring attribute as ByteArray What is the expected output? What do you see instead? Byte array should be loaded with binary data. Instead, it is null. If the VO declares it as a string, the data is there but terminates at the first \0. The binary data is on the wire, verified by Wireshark. What version of the product are you using? On what operating system? Rails 2.3.3. Ruby 1.8.6 rubyAMF 1.6.5 Flex 3 Please provide any additional information below. Here's an email thread discussing the problem: Hey, you're right, this is a bug, I've been doing some test and I find that binary data is being serialized to strings instead of bytearrays. Please, could you fill up a new issue in the bugtracker, with the details in this email? so we can keep up the work about this. I think it's a serious issue, it's probably that it'll be fixed in the next release. Thank you On Fri, Aug 21, 2009 at 8:08 PM, martypicco <marty@picco.org> wrote: Hi, I'm trying to use rubyAMF to load images from a database with no success. I have a class Artifact that represents a file on the server. When an artifact is read or written in Rails, I use the after_initialize and before_save callbacks to load/save the payload data from/to the referenced file. This way when the Flex client gets the entire artifact in one load. The payload attribute holds the file data. When I declare this to be a String in my VO, everything works fine as long as the file being referenced is text (e.g. XML); but if the file is binary (e.g. PNG) then the payload is truncated at the first zero (no real surprise there). When I declare the payload to be a ByteArray in Flex, I get a null payload no matter what's in the file. I've verified that the data is sent from rails using Wireshark. I've searched high and low but can't find any reference to how to properly handle binary data using rubyAMF. I see some references using PHP etc., but nothing for Ruby. Any ideas? I am completely stuck at the moment. Thanks, Marty Artifact schema in Rails: create_table "artifacts", :force => true do |t| t.integer "pubdoc_id" t.string "filename" t.string "format" t.datetime "created_at" t.datetime "updated_at" t.binary "payload" end My class mapping in rubyamf.cfg: ClassMappings.register( :actionscript => 'Artifact', :ruby => 'Artifact', :type => 'active_record', :attributes => ["id","pubdoc_id","filename","format","payload","created_at","updated_at"]) My VO in Flex: [Bindable] [RemoteClass(alias="Artifact")] public class Artifact { // attributes public var id:int; public var pubdocId:int; public var filename:String; public var format:String; public var createdAt:Date; public var updatedAt:Date; public var payload:String; // using ByteArray doesn't seem to work... [Transient] public var artifactLoaded:Boolean; [Transient] public var artifacts:ArrayCollection; } -- www.victorcoder.com
  • Aug 25, 2009
    issue 81 (mapped VOs generate default values when mapped, potentially ...) commented on by toro04   -   I ran into the same issue with uint. I ended up using Number which defaults to NaN.
    I ran into the same issue with uint. I ended up using Number which defaults to NaN.
  • Aug 25, 2009
    r1319 (* Branch to test against ruby 1.9) committed by victorcoder   -   * Branch to test against ruby 1.9
    * Branch to test against ruby 1.9
  • Aug 25, 2009
    r1318 (* Stable 1.6.5) committed by victorcoder   -   * Stable 1.6.5
    * Stable 1.6.5
  • Aug 25, 2009
    r1317 (old 1.6.4) committed by victorcoder   -   old 1.6.4
    old 1.6.4
  • Aug 25, 2009
    r1316 (* Stable 1.6.5) committed by victorcoder   -   * Stable 1.6.5
    * Stable 1.6.5
  • Aug 25, 2009
    r1315 ([No log message]) committed by victorcoder   -   [No log message]
    [No log message]
  • Aug 25, 2009
    r1314 ([No log message]) committed by victorcoder   -   [No log message]
    [No log message]
  • Aug 25, 2009
    r1313 (* Stable 1.6.5 release) committed by victorcoder   -   * Stable 1.6.5 release
    * Stable 1.6.5 release
  • Aug 25, 2009
    r1312 ([No log message]) committed by victorcoder   -   [No log message]
    [No log message]
  • Aug 25, 2009
    r1311 (Stable 1.6.5 release) committed by victorcoder   -   Stable 1.6.5 release
    Stable 1.6.5 release
  • Aug 16, 2009
    issue 93 (symbol hash keys cause exception in AMFSerializer.write_hash) commented on by alexandrebini   -   i´m having the same problem... was it solved?
    i´m having the same problem... was it solved?
  • Aug 12, 2009
    issue 116 (Installation troubles together with cached_externals (37sign...) reported by frederik.vollert   -   What steps will reproduce the problem? 1. Use Rails 2.3.3 with Plugin cached_externals (37signals, git) 2. Try to setup rubyamf Revision 1310 as external (cap externals:setup) with /config/externals.yml: vendor/plugins/rubyamf: :type: subversion :repository: http://rubyamf.googlecode.com/svn/trunk/rubyamf/ :revision: "1310" 3. script/server fails because required libs could not be included (util/...) 4. This happens because the config files are not copied to /config/ during plugin installation. Possible Fix: The reason for this may be your install.rb and its use of relative paths (./vendor/). Using RailsApp-Absolute Paths like RAILS_ROOT may fix this problem.
    What steps will reproduce the problem? 1. Use Rails 2.3.3 with Plugin cached_externals (37signals, git) 2. Try to setup rubyamf Revision 1310 as external (cap externals:setup) with /config/externals.yml: vendor/plugins/rubyamf: :type: subversion :repository: http://rubyamf.googlecode.com/svn/trunk/rubyamf/ :revision: "1310" 3. script/server fails because required libs could not be included (util/...) 4. This happens because the config files are not copied to /config/ during plugin installation. Possible Fix: The reason for this may be your install.rb and its use of relative paths (./vendor/). Using RailsApp-Absolute Paths like RAILS_ROOT may fix this problem.
  • Jul 17, 2009
    Installation Wiki page commented on by jamsaver   -   thank you nehuln that helped alot....
    thank you nehuln that helped alot....
  • Jul 16, 2009
    issue 115 (has_many associations return objects in ArrayCollection) reported by spas.poptchev   -   Hi, when I return an object with a eager loaded has_many association the ArrayCollection doesnt include the proper class for the association. The array elements always have the flex Object class. Not the class of the association... If I map it as a has_many_and_belongs_to, has_one or belongs_to association it works fine. Is this a general problem? Is there a fix for it?
    Hi, when I return an object with a eager loaded has_many association the ArrayCollection doesnt include the proper class for the association. The array elements always have the flex Object class. Not the class of the association... If I map it as a has_many_and_belongs_to, has_one or belongs_to association it works fine. Is this a general problem? Is there a fix for it?
  • Jul 08, 2009
    issue 81 (mapped VOs generate default values when mapped, potentially ...) commented on by al...@pet-theory.com   -   Type:uint. Not sure what the problem was. Maybe I didn't realize that the default for uint would be 0 if I didn't assign anything in Flex?
    Type:uint. Not sure what the problem was. Maybe I didn't realize that the default for uint would be 0 if I didn't assign anything in Flex?
  • Jul 08, 2009
    issue 81 (mapped VOs generate default values when mapped, potentially ...) commented on by victorcoder   -   Please especify the type of the circumference values
    Please especify the type of the circumference values
  • Jul 08, 2009
    issue 113 (error when using Rails 2.3.2 and mongrel_rails start or Apac...) Summary changed by victorcoder   -   Same issue using Apache + Passenger 2.0.3 [Sun Jun 28 07:54:23 2009] [notice] Apache/2.2.11 (Ubuntu) Phusion_Passenger/2.0.3 configured -- resuming normal operations :0:Warning: Gem::SourceIndex#search support for String patterns is deprecated u have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] /home/season/gyneaserver/vendor/plugins/rubyamf/io/read_write.rb:85:in `read_int8' /home/season/gyneaserver/vendor/plugins/rubyamf/io/amf_deserializer.rb:45:in `preamble' /home/season/gyneaserver/vendor/plugins/rubyamf/io/amf_deserializer.rb:30:in `rubyamf_read' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:21:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:12:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:11:in `each' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:11:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/rails_gateway.rb:28:in `service' /home/season/gyneaserver/app/controllers/rubyamf_controller.rb:16:in `gateway' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1322:in `send' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1322:in `perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:617:in `call_filters' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms' /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
    Summary: error when using Rails 2.3.2 and mongrel_rails start or Apache + Passenger
    Same issue using Apache + Passenger 2.0.3 [Sun Jun 28 07:54:23 2009] [notice] Apache/2.2.11 (Ubuntu) Phusion_Passenger/2.0.3 configured -- resuming normal operations :0:Warning: Gem::SourceIndex#search support for String patterns is deprecated u have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] /home/season/gyneaserver/vendor/plugins/rubyamf/io/read_write.rb:85:in `read_int8' /home/season/gyneaserver/vendor/plugins/rubyamf/io/amf_deserializer.rb:45:in `preamble' /home/season/gyneaserver/vendor/plugins/rubyamf/io/amf_deserializer.rb:30:in `rubyamf_read' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:21:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:12:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:11:in `each' /home/season/gyneaserver/vendor/plugins/rubyamf/app/filters.rb:11:in `run' /home/season/gyneaserver/vendor/plugins/rubyamf/app/rails_gateway.rb:28:in `service' /home/season/gyneaserver/app/controllers/rubyamf_controller.rb:16:in `gateway' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1322:in `send' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1322:in `perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:617:in `call_filters' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms' /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
    Summary: error when using Rails 2.3.2 and mongrel_rails start or Apache + Passenger
  • Jun 30, 2009
    issue 114 (NaN/null not serialized correctly for Numeric values. (has p...) commented on by trisweb   -   Other interesting references: http://www.justskins.com/forums/nan-and-inifinity-42946.html http://pyamf.org/changeset/2438 (representation of NaN is similar in Python, and the same in the binary string shown in that changeset)
    Other interesting references: http://www.justskins.com/forums/nan-and-inifinity-42946.html http://pyamf.org/changeset/2438 (representation of NaN is similar in Python, and the same in the binary string shown in that changeset)
  • Jun 30, 2009
    issue 114 (NaN/null not serialized correctly for Numeric values. (has p...) commented on by trisweb   -   Patch Also, this currently only applies to ActiveRecord objects, but works for both assumed and mapped types.
    Patch Also, this currently only applies to ActiveRecord objects, but works for both assumed and mapped types.
  • Jun 30, 2009
    issue 114 (NaN/null not serialized correctly for Numeric values. (has p...) reported by trisweb   -   What steps will reproduce the problem? 1. Find an ActiveRecord object with a null value for a numeric field. 2. Send object to Flex. The expected output is that the value for a null would be NaN on the flex side, but instead, the value is 0. The deserialization works fine - an NaN value sent from Flex to RubyAMF will result in a nil, and will be stored correctly as nil in the database. Serialization sees this nil, has no type information, and simply outputs a nil to the bytestream. Instead, if the type of the attribute is Numeric, a nil value for that attribute should be rendered as a NaN. Fortunately, Ruby has the notion of NaN and serializing this value as a standard double works as expected. Thus, it's as simple as checking the attribute type, and if it's Numeric and the value nil, then setting the value in the outgoing vo_hash to NaN works perfectly. This allows perfect serialization/deserialization of both 0 and NaN/nil Number and int values round trip. Latest SVN version used. Patch included.
    What steps will reproduce the problem? 1. Find an ActiveRecord object with a null value for a numeric field. 2. Send object to Flex. The expected output is that the value for a null would be NaN on the flex side, but instead, the value is 0. The deserialization works fine - an NaN value sent from Flex to RubyAMF will result in a nil, and will be stored correctly as nil in the database. Serialization sees this nil, has no type information, and simply outputs a nil to the bytestream. Instead, if the type of the attribute is Numeric, a nil value for that attribute should be rendered as a NaN. Fortunately, Ruby has the notion of NaN and serializing this value as a standard double works as expected. Thus, it's as simple as checking the attribute type, and if it's Numeric and the value nil, then setting the value in the outgoing vo_hash to NaN works perfectly. This allows perfect serialization/deserialization of both 0 and NaN/nil Number and int values round trip. Latest SVN version used. Patch included.
  • Jun 18, 2009
    issue 113 (error when using Rails 2.3.2 and mongrel_rails start) commented on by DWortlehock   -   This problem exists with rails 2.3.2 but does not with rails 2.2.x
    This problem exists with rails 2.3.2 but does not with rails 2.2.x
  • Jun 18, 2009
    issue 113 (error when using Rails 2.3.2 and mongrel_rails start) reported by victorcoder   -   What steps will reproduce the problem? 1. Start the application: mongrel_rails start 2. Do a AMF service request What is the expected output? Normal serialization What do you see instead? mongrel_rails start then Mongrel starts without any error, but when the first RPC-call is done, I get the following error: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/read_write.rb:85:in `read_int8' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/amf_deserializer.rb: 45:in `preamble' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/amf_deserializer.rb: 30:in `rubyamf_read' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:21:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:12:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:11:in `each' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:11:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/rails_gateway.rb: 28:in `service' C:/Entwicklung/bookmarks/app/controllers/rubyamf_controller.rb:16:in `gateway' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:1322:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:1322:in `perform_action_without_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:617:in `call_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:610:in `perform_action_without_benchmark' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:17:in `ms' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:10:in `realtime' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:17:in `ms' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ rescue.rb:160:in `perform_action_without_flash' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ flash.rb:141:in `perform_action' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:523:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:523:in `process_without_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:606:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:391:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:386:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ routing/route_set.rb:433:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:88:in `dispatch' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:111:in `_call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:82:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:29:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:29:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ connection_adapters/abstract/query_cache.rb:34:in `cache' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:9:in `cache' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:28:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:361:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/head.rb:9:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/methodoverride.rb:24:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ params_parser.rb:15:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ rewindable_input.rb:25:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ session/cookie_store.rb:93:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ reloader.rb:9:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ failsafe.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:106:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ cgi_process.rb:44:in `dispatch_cgi' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:102:in `dispatch_cgi' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:28:in `dispatch' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:76:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:74:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:74:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:159:in `process_client' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:158:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:158:in `process_client' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:282:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:281:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:281:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ mongrel_rails:128:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/command.rb:212:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ mongrel_rails:281 C:/Ruby/bin/mongrel_rails:19:in `load' C:/Ruby/bin/mongrel_rails:19 The application will work as expected in subsequent calls.
    What steps will reproduce the problem? 1. Start the application: mongrel_rails start 2. Do a AMF service request What is the expected output? Normal serialization What do you see instead? mongrel_rails start then Mongrel starts without any error, but when the first RPC-call is done, I get the following error: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/read_write.rb:85:in `read_int8' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/amf_deserializer.rb: 45:in `preamble' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/io/amf_deserializer.rb: 30:in `rubyamf_read' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:21:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:12:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:11:in `each' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/filters.rb:11:in `run' C:/Entwicklung/bookmarks/vendor/plugins/rubyamf/app/rails_gateway.rb: 28:in `service' C:/Entwicklung/bookmarks/app/controllers/rubyamf_controller.rb:16:in `gateway' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:1322:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:1322:in `perform_action_without_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:617:in `call_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:610:in `perform_action_without_benchmark' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:17:in `ms' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:10:in `realtime' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/benchmark.rb:17:in `ms' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ rescue.rb:160:in `perform_action_without_flash' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ flash.rb:141:in `perform_action' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:523:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:523:in `process_without_filters' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ filters.rb:606:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:391:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ base.rb:386:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ routing/route_set.rb:433:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:88:in `dispatch' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:111:in `_call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:82:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:29:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:29:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ connection_adapters/abstract/query_cache.rb:34:in `cache' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:9:in `cache' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ query_cache.rb:28:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:361:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/head.rb:9:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/methodoverride.rb:24:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ params_parser.rb:15:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ rewindable_input.rb:25:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ session/cookie_store.rb:93:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ reloader.rb:9:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ failsafe.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ vendor/rack-1.0/rack/lock.rb:11:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:106:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ cgi_process.rb:44:in `dispatch_cgi' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:102:in `dispatch_cgi' C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ dispatcher.rb:28:in `dispatch' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:76:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:74:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/rails.rb:74:in `process' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:159:in `process_client' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:158:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:158:in `process_client' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:285:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel.rb:268:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:282:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:281:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/configurator.rb:281:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ mongrel_rails:128:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/ mongrel/command.rb:212:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ mongrel_rails:281 C:/Ruby/bin/mongrel_rails:19:in `load' C:/Ruby/bin/mongrel_rails:19 The application will work as expected in subsequent calls.
  • Jun 17, 2009
    issue 112 ("Unknown action" is not output) reported by tnedlacer   -   rubyamf/util/action_controller.rb <pre> def render_with_amf(options = nil, &block) begin if options && options.is_a?(Hash) && options.keys.include?(:amf) #set the @performed_render flag to avoid double renders @performed_render = true #store results on RequestStore, can't prematurely return or send_data. RubyAMF::App::RequestStore.render_amf_results = options[:amf] RubyAMF::Configuration::ClassMappings.current_mapping_scope = options[:class_mapping_scope]||RubyAMF::Configuration::ClassMappings.default_mapping_scope else render_without_amf(options,&block) end rescue Exception => e #suppress missing template warnings raise e if !e.message.match(/^Missing template/) end end </pre> to <pre> def render_with_amf(options = nil, &block) if options && options.is_a?(Hash) && options.keys.include?(:amf) begin #set the @performed_render flag to avoid double renders @performed_render = true #store results on RequestStore, can't prematurely return or send_data. RubyAMF::App::RequestStore.render_amf_results = options[:amf] RubyAMF::Configuration::ClassMappings.current_mapping_scope = options[:class_mapping_scope]||RubyAMF::Configuration::ClassMappings.default_mapping_scope rescue Exception => e #suppress missing template warnings raise e if !e.message.match(/^Missing template/) end else render_without_amf(options,&block) end end </pre>
    rubyamf/util/action_controller.rb <pre> def render_with_amf(options = nil, &block) begin if options && options.is_a?(Hash) && options.keys.include?(:amf) #set the @performed_render flag to avoid double renders @performed_render = true #store results on RequestStore, can't prematurely return or send_data. RubyAMF::App::RequestStore.render_amf_results = options[:amf] RubyAMF::Configuration::ClassMappings.current_mapping_scope = options[:class_mapping_scope]||RubyAMF::Configuration::ClassMappings.default_mapping_scope else render_without_amf(options,&block) end rescue Exception => e #suppress missing template warnings raise e if !e.message.match(/^Missing template/) end end </pre> to <pre> def render_with_amf(options = nil, &block) if options && options.is_a?(Hash) && options.keys.include?(:amf) begin #set the @performed_render flag to avoid double renders @performed_render = true #store results on RequestStore, can't prematurely return or send_data. RubyAMF::App::RequestStore.render_amf_results = options[:amf] RubyAMF::Configuration::ClassMappings.current_mapping_scope = options[:class_mapping_scope]||RubyAMF::Configuration::ClassMappings.default_mapping_scope rescue Exception => e #suppress missing template warnings raise e if !e.message.match(/^Missing template/) end else render_without_amf(options,&block) end end </pre>
  • Jun 04, 2009
    issue 111 (undefined method `validates_datetime') reported by tnedlacer   -   I am using the plugin named validates_timeliness. ------------------------------------- class Person < ActiveRecord::Base validates_datetime :birthday end ------------------------------------- I install rubyamf and "ClassMappings.register" into config/rubyamf_config.rb; $ ruby script/server /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1964:in `method_missing': undefined method `validates_datetime' for #<Class:0x230d6c4> (NoMethodError) Rubyamf executes "ClassMappings.register" before reading validates_timeliness; $ ls -1 vendor/plugins/ rubyamf validates_timeliness I changed the name from "vendor/plugins/rubyamf" into "vendor/plugins/~rubyamf". $ ls -1 vendor/plugins/ validates_timeliness ~rubyamf $ ruby script/server No Error
    I am using the plugin named validates_timeliness. ------------------------------------- class Person < ActiveRecord::Base validates_datetime :birthday end ------------------------------------- I install rubyamf and "ClassMappings.register" into config/rubyamf_config.rb; $ ruby script/server /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1964:in `method_missing': undefined method `validates_datetime' for #<Class:0x230d6c4> (NoMethodError) Rubyamf executes "ClassMappings.register" before reading validates_timeliness; $ ls -1 vendor/plugins/ rubyamf validates_timeliness I changed the name from "vendor/plugins/rubyamf" into "vendor/plugins/~rubyamf". $ ls -1 vendor/plugins/ validates_timeliness ~rubyamf $ ruby script/server No Error
  • Jun 04, 2009
    issue 110 (AMF deserializer bug) reported by nelson.silva   -   When deserializing an AMF object and using ClassMappings.check_for_associations = true the set_value method in VOHelper throws an exception for attributes that don't exist in the AR model since there is no mapping. This patch should make it work. --- tmp/.diff_wkWfZq +++ vendor/plugins/rubyamf/util/vo_helper.rb @@ -63,7 +63,7 @@ end elsif # build @methods hash - if mapping[:methods] + if !mapping.nil? and mapping[:methods] @methods = Hash.new if !@methods @methods[obj.class.name]=Hash.new if !@methods[obj.class.name] mapping[:methods].each do |method|
    When deserializing an AMF object and using ClassMappings.check_for_associations = true the set_value method in VOHelper throws an exception for attributes that don't exist in the AR model since there is no mapping. This patch should make it work. --- tmp/.diff_wkWfZq +++ vendor/plugins/rubyamf/util/vo_helper.rb @@ -63,7 +63,7 @@ end elsif # build @methods hash - if mapping[:methods] + if !mapping.nil? and mapping[:methods] @methods = Hash.new if !@methods @methods[obj.class.name]=Hash.new if !@methods[obj.class.name] mapping[:methods].each do |method|
  • May 29, 2009
    issue 107 (Method mapping for associations) commented on by tony.hillerson   -   Nice.. thanks vic
    Nice.. thanks vic
  • May 29, 2009
    issue 108 (Class mapping in rubyamf_config.rb causes problem when deplo...) Owner changed by victorcoder   -  
    Owner: victorcoder
    Owner: victorcoder
  • May 29, 2009
    issue 107 (Method mapping for associations) Status changed by victorcoder   -   Commited the patch to trunk
    Status: Fixed
    Commited the patch to trunk
    Status: Fixed
  • May 29, 2009
    r1310 (-Added changes to CHANGELOG) committed by victorcoder   -   -Added changes to CHANGELOG
    -Added changes to CHANGELOG
  • May 29, 2009
    r1309 (Fixed issue #107, method mapping for associations) committed by victorcoder   -   Fixed issue #107 , method mapping for associations
    Fixed issue #107 , method mapping for associations
  • May 29, 2009
    r1308 (-Added changes to CHANGELOG) committed by victorcoder   -   -Added changes to CHANGELOG
    -Added changes to CHANGELOG
  • May 29, 2009
    r1307 (-Fixed misspelling of association :has_many_and_belongs_to) committed by victorcoder   -   -Fixed misspelling of association :has_many_and_belongs_to
    -Fixed misspelling of association :has_many_and_belongs_to
  • May 18, 2009
    issue 109 (Limiting the automatic serialization of instance variables f...) reported by brian.noguchi   -   What steps will reproduce the problem? 1. Create a custom class (not descending from ActiveRecord::Base) with attr_reader :att1, :att2, :att3, :att4 2. Declare the ClassMapping for this custom class; try limiting which getter methods (that are generated by attr_reader) get serialized with the :attributes, and :methods args in the ClassMappings.register call in rubyamf_config.rb What is the expected output? What do you see instead? The resulting serialized object is serialized with all its instance variables -- i.e., ["@attr1", "@attr2", "@attr3", "@attr4"] What version of the product are you using? On what operating system? Revision 1306 at http://rubyamf.googlecode.com/svn/trunk. Operating system is Ubuntu 8.04. On Ruby 1.8 and Rails 2.2 Please provide any additional information below. The fix is to add the following after line 156 in util/vo_helper.rb: instance_vars = map[:only_instance_variables].map {|ivar| '@' + ivar} if map[:only_instance_variables] just after line 156's new_object._explicitType = map[:actionscript] Combining this with a new call in rubyamf_config.rb: ClassMappings.register(:actionscript => 'vo.CustomClassVO', :ruby => 'CustomClass', :type => 'custom', :only_instance_variables => ["attr1", "attr2"] will result in the selective serialization of attr1 and attr2, not attr3 and not attr4.
    What steps will reproduce the problem? 1. Create a custom class (not descending from ActiveRecord::Base) with attr_reader :att1, :att2, :att3, :att4 2. Declare the ClassMapping for this custom class; try limiting which getter methods (that are generated by attr_reader) get serialized with the :attributes, and :methods args in the ClassMappings.register call in rubyamf_config.rb What is the expected output? What do you see instead? The resulting serialized object is serialized with all its instance variables -- i.e., ["@attr1", "@attr2", "@attr3", "@attr4"] What version of the product are you using? On what operating system? Revision 1306 at http://rubyamf.googlecode.com/svn/trunk. Operating system is Ubuntu 8.04. On Ruby 1.8 and Rails 2.2 Please provide any additional information below. The fix is to add the following after line 156 in util/vo_helper.rb: instance_vars = map[:only_instance_variables].map {|ivar| '@' + ivar} if map[:only_instance_variables] just after line 156's new_object._explicitType = map[:actionscript] Combining this with a new call in rubyamf_config.rb: ClassMappings.register(:actionscript => 'vo.CustomClassVO', :ruby => 'CustomClass', :type => 'custom', :only_instance_variables => ["attr1", "attr2"] will result in the selective serialization of attr1 and attr2, not attr3 and not attr4.
  • May 17, 2009
    issue 108 (Class mapping in rubyamf_config.rb causes problem when deplo...) commented on by lin.zhp   -   Actually, I find later that this issue is not out of the reason I described above. I have the following in Guest.initialize: def initialize(params = nil) super self.looks = Hash.new self.item_requires = Hash.new self.prize_gifts = Hash.new end Since before migration,there's no "prize_gifts" in the table, the initializer failed. However, it's strange that rubyamf call Guest.initialize while loading the configuration. I find it is trying to get attribute_names in rubyamf/app/configuration.rb:54: @attribute_names[mapping[:ruby]] = (mapping[:ruby].constantize.new.attribute_names + ["id"]).inject({}){|hash, attr| hash[attr]=true ; hash} # include the id attribute
    Actually, I find later that this issue is not out of the reason I described above. I have the following in Guest.initialize: def initialize(params = nil) super self.looks = Hash.new self.item_requires = Hash.new self.prize_gifts = Hash.new end Since before migration,there's no "prize_gifts" in the table, the initializer failed. However, it's strange that rubyamf call Guest.initialize while loading the configuration. I find it is trying to get attribute_names in rubyamf/app/configuration.rb:54: @attribute_names[mapping[:ruby]] = (mapping[:ruby].constantize.new.attribute_names + ["id"]).inject({}){|hash, attr| hash[attr]=true ; hash} # include the id attribute
  • May 17, 2009
    issue 108 (Class mapping in rubyamf_config.rb causes problem when deplo...) commented on by lin.zhp   -   Sorry, it is not an issue. It's a bug in my initializer
    Sorry, it is not an issue. It's a bug in my initializer
  • May 17, 2009
    issue 108 (Class mapping in rubyamf_config.rb causes problem when deplo...) reported by lin.zhp   -   What steps will reproduce the problem? 1. add "some_field" to "some_table" by creating a migration 2. run the migration 3. Modify class mapping to map "some_field" to its counterpart, so far so good, then: 4. Deploy all the changes to other machines What is the expected output? What do you see instead? The migration will break in other machines, because before running migration, rails will load rubyamf_config.rb and find there is no "some_field" in "some_table" and the model. What version of the product are you using? On what operating system? Flex 3 on Rails 2.2.2, Windows XP Please provide any additional information below. Part of the exception stack while running migration: D:\flex workspace\hotel>rake db:migrate --trace (in D:/flex workspace/hotel) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `prize_gifts=' for #<Guest:0x46b1148> D:/flex workspace/hotel/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:255:in `method_missing' D:/flex workspace/hotel/app/models/guest.rb:14:in `initialize' D:/flex workspace/hotel/vendor/plugins/rubyamf/app/configuration.rb:54:in `new' D:/flex workspace/hotel/vendor/plugins/rubyamf/app/configuration.rb:54:in `register' D:/flex workspace/hotel/config/rubyamf_config.rb:89 C:/Programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' C:/Programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' D:/flex workspace/hotel/vendor/plugins/rubyamf/init.rb:11:in `evaluate_init_rb' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:103:in `evaluate_init_rb' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:99:in `evaluate_init_rb' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:44:in `load' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:323:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:160:in `process' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:112:in `send' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:112:in `run' D:/flex workspace/hotel/config/environment.rb:13
    What steps will reproduce the problem? 1. add "some_field" to "some_table" by creating a migration 2. run the migration 3. Modify class mapping to map "some_field" to its counterpart, so far so good, then: 4. Deploy all the changes to other machines What is the expected output? What do you see instead? The migration will break in other machines, because before running migration, rails will load rubyamf_config.rb and find there is no "some_field" in "some_table" and the model. What version of the product are you using? On what operating system? Flex 3 on Rails 2.2.2, Windows XP Please provide any additional information below. Part of the exception stack while running migration: D:\flex workspace\hotel>rake db:migrate --trace (in D:/flex workspace/hotel) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `prize_gifts=' for #<Guest:0x46b1148> D:/flex workspace/hotel/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:255:in `method_missing' D:/flex workspace/hotel/app/models/guest.rb:14:in `initialize' D:/flex workspace/hotel/vendor/plugins/rubyamf/app/configuration.rb:54:in `new' D:/flex workspace/hotel/vendor/plugins/rubyamf/app/configuration.rb:54:in `register' D:/flex workspace/hotel/config/rubyamf_config.rb:89 C:/Programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' C:/Programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' D:/flex workspace/hotel/vendor/plugins/rubyamf/init.rb:11:in `evaluate_init_rb' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:103:in `evaluate_init_rb' D:/flex workspace/hotel/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:99:in `evaluate_init_rb' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin.rb:44:in `load' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:323:in `load_plugins' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:160:in `process' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:112:in `send' D:/flex workspace/hotel/config/../vendor/rails/railties/lib/initializer.rb:112:in `run' D:/flex workspace/hotel/config/environment.rb:13
  • May 17, 2009
    issue 88 (around_filters in proxied controller causes code to run twic...) commented on by danieljwoods   -   This issue can be fixed by inserting the line below as line 10 of rubyamf/util/action_controller.rb @performed_render = true The ActionController around_filter code checks that to decide if it needs to run the action after the around_filter completes.
    This issue can be fixed by inserting the line below as line 10 of rubyamf/util/action_controller.rb @performed_render = true The ActionController around_filter code checks that to decide if it needs to run the action after the around_filter completes.
  • May 06, 2009
    issue 107 (Method mapping for associations) commented on by nelson.silva   -   Your right. I fixed it in my version but I forgot to update the patch. Sorry about that.
    Your right. I fixed it in my version but I forgot to update the patch. Sorry about that.
  • May 06, 2009
    issue 107 (Method mapping for associations) changed by victorcoder   -   The patch seems to works correctly, but not in all cases. I've made a fix to catch the case @methods hash is not defined.
    Status: Started
    Owner: victorcoder
    Cc: tony.hillerson
    The patch seems to works correctly, but not in all cases. I've made a fix to catch the case @methods hash is not defined.
    Status: Started
    Owner: victorcoder
    Cc: tony.hillerson
 
Hosted by Google Code