I''m trying to set deploy an app on apache2 with the fcgid module, but can''t seem to get anywhere. Things work fine with cgi, but when i switch to fcgi, i''m stuck with a ''503: Service Temporarily Unavailable''. There''s no error being logged anywhere, afaik. Trying to run dispatch.fcgi from the shell doesn''t work either. It bombs out, and the following is written to ''railsapp/log/fastcgi.crash.log'': -- [07/Mar/2006:16:15:34 :: 29789] starting [07/Mar/2006:16:15:34 :: 29789] Dispatcher failed to catch: undefined method `is_cgi?'' for FCGI:Class (NoMethodError) /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:593:in `each_cgi'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'' ./dispatch.fcgi:24 almost killed by this error [07/Mar/2006:16:15:34 :: 29789] Dispatcher failed to catch: undefined method `is_cgi?'' for FCGI:Class (NoMethodError) /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:593:in `each_cgi'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'' ./dispatch.fcgi:24 killed by this error -- Line 24 would be ''RailsFCGIHandler.process!''. Suggestions on what to try next? Environment: Ruby 1.8.4 (2005-12-24) [i386-linux], rails (1.0.0), fcgi (0.8.6.1), apache2, fcgid 1.0.8.. -- View this message in context: http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3282773 Sent from the RubyOnRails Users forum at Nabble.com.
Started from the shell, dispatch.cgi prints ''Status: 500 Internal Server Error'', while there''s no output from dispatch.fcgi. -- View this message in context: http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3282844 Sent from the RubyOnRails Users forum at Nabble.com.
All, I am looking to return Model objects [mainly for demo purposes] as Web Services. So I defined my Web Service as follows: class StringLengthApi < ActionWebService::API::Base api_method :findLength, :expects => [:string], :returns => [PersonContact] end Here is the definition of my model object: class PersonContact < ActiveRecord::Base set_table_name "person_contact" set_primary_key "contact_id" has_one :user, :class_name => "User", :foreign_key => "user_id" has_one :buyer_role, :class_name => "BuyerRole", :foreign_key => "buyer_id" has_many :notes, :class_name => "Note", :foreign_key => "contact_id" has_many :tasks, :class_name => "Task", :foreign_key => "contact_id" end What happens when the WSDL generation occurs, is that it does not traverse my relationships at all. I have attached the generated WSDL for example purposes. Thanks in advance, Ron -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 10423 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060307/dd3cbab2/attachment.bin
No, AWS it doesn''t traverse activerecord associations. Mostly I think because it''s difficult to answer the question of when to stop. In your example, if User model object has further associations, should AWS traverse them too? I''d recommend you to create a AWS::Struct object for each web service method that returns a complex data structure. This way you can manage how much data will be transferred when it''s called. Kent. On 3/7/06, Ron DiFrango <rdifrango@captechventures.com> wrote:> All, > > I am looking to return Model objects [mainly for demo purposes] as Web Services. So I defined my Web Service as follows: > > class StringLengthApi < ActionWebService::API::Base > api_method :findLength, :expects => [:string], :returns => [PersonContact] > end > > Here is the definition of my model object: > > class PersonContact < ActiveRecord::Base > set_table_name "person_contact" > set_primary_key "contact_id" > has_one :user, > :class_name => "User", > :foreign_key => "user_id" > has_one :buyer_role, > :class_name => "BuyerRole", > :foreign_key => "buyer_id" > has_many :notes, > :class_name => "Note", > :foreign_key => "contact_id" > has_many :tasks, > :class_name => "Task", > :foreign_key => "contact_id" > > end > > What happens when the WSDL generation occurs, is that it does not traverse my relationships at all. I have attached the generated WSDL for example purposes. > > Thanks in advance, > > Ron > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Kent --- http://www.datanoise.com
Kent, That makes sense and is likely best practice any way. Although it would be nice to proved some sort of depth indicator to say how deep into an AR the WSDL generation should go. Ron ________________________________ From: rails-bounces@lists.rubyonrails.org on behalf of Kent Sibilev Sent: Tue 3/7/2006 11:01 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Web Services WSDL Generation Question No, AWS it doesn''t traverse activerecord associations. Mostly I think because it''s difficult to answer the question of when to stop. In your example, if User model object has further associations, should AWS traverse them too? I''d recommend you to create a AWS::Struct object for each web service method that returns a complex data structure. This way you can manage how much data will be transferred when it''s called. Kent. On 3/7/06, Ron DiFrango <rdifrango@captechventures.com> wrote:> All, > > I am looking to return Model objects [mainly for demo purposes] as Web Services. So I defined my Web Service as follows: > > class StringLengthApi < ActionWebService::API::Base > api_method :findLength, :expects => [:string], :returns => [PersonContact] > end > > Here is the definition of my model object: > > class PersonContact < ActiveRecord::Base > set_table_name "person_contact" > set_primary_key "contact_id" > has_one :user, > :class_name => "User", > :foreign_key => "user_id" > has_one :buyer_role, > :class_name => "BuyerRole", > :foreign_key => "buyer_id" > has_many :notes, > :class_name => "Note", > :foreign_key => "contact_id" > has_many :tasks, > :class_name => "Task", > :foreign_key => "contact_id" > > end > > What happens when the WSDL generation occurs, is that it does not traverse my relationships at all. I have attached the generated WSDL for example purposes. > > Thanks in advance, > > Ron > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Kent --- http://www.datanoise.com _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 6278 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060307/d05cba00/attachment-0001.bin
On 3/7/06, Lucifron <oneshot_48@hotmail.com> wrote:> > Started from the shell, dispatch.cgi prints ''Status: 500 Internal Server > Error'', while there''s no output from dispatch.fcgi. >dispatch.fcgi from the shell should also give you the ''Status: 500 Internal Server Error'' message. Go back thru your fcgi setup and make sure you have everything setup right. In particular make sure you have the fcgi gem installed. "gem list" will give you a list of your installed gems. Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century
Found a solution at the very bottom of http://wiki.rubyonrails.com/rails/pages/FastCGI . Seems the native fcgi library didn''t get loaded. Regret not trying to load the fcgid module now, but switched to fastcgi once i saw this, and as things seem to be working.. -- View this message in context: http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3298981 Sent from the RubyOnRails Users forum at Nabble.com.