Having a different issue with Rails 3.0.1. First off, I'm not new to
rubyAMF or rails and I've had a lot of fun with rubyAMF in the past
with rails2. I'm trying to start new with a fresh rails3 app. I use
RVM to manage my rubies and have tried the following experiment in the
latest REE and 1.9.2, both have failed with the exact same results.
Steps:
Generate new rails app, scaffold simple widget model with a name field
of type string.
Modify routes to point root to the widget index method.
Install plugin via "rails plugin install git://
github.com/victorcoder/rubyamf_plugin.git"
Gateway logo shows up fine at localhost/rubyamf/gateway/
I added a simple hello world amf response to my index method by adding
format.amf { render :amf => 'hello world' } to the respond_to block.
Simple right?
Now when I try and hit that method, I get a null result. Here is the
strange thing, if I type localhost/widgets.amf in the browser then hit
that method I get my 'hello world' as expected.
Also when I try to render @widgets as amf, the rubyAMF PrepareAction,
RailsInvokeAction, and Serialization trigger but the returned index
gets processed as HTML!
Here is the output from the server:
>>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::PrepareAction:0x000000028c7088> took: 0.00009 secs
>>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::RailsInvokeAction:0x000000028c7060> took: 0.08593 secs
>>>>>>>> RubyAMF >>>>>>>>> Serialization took: 0.00004 secs
Started POST "/rubyamf/gateway/" for 192.168.10.1 at 2010-10-26
12:48:49 -0400
Processing by RubyamfController#gateway as HTML
Processing by WidgetsController#index as HTML
Widget Load (0.4ms) SELECT "widgets".* FROM "widgets"
Rendered widgets/index.html.erb within layouts/application (12.9ms)
Completed 200 OK in 36ms (Views: 20.1ms | ActiveRecord: 0.4ms)
Rendered text template (0.0ms)
Sent data (1.1ms)
Completed 200 OK in 90ms (Views: 1.0ms | ActiveRecord: 0.0ms)
Adding amf extension in the browser doesn't work for @widgets, in
either case, the server displays the same info. Rendering xml is
fine.
I use Flash CS5 and GutterShark to handle my amf services, works with
other services and has been proven to work with rubyAMF under an older
rails2 app.
Has anyone experienced this? Any input would be well welcomed.
Thanks in advance,
Phil