Web Service: NoMethodError (missing attribute: featured) !?!


#1

Hi all -

I have a Player model. The database looks like this:

±------------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------------±-------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| fname | varchar(255) | YES | | NULL | |
| lname | varchar(255) | YES | | NULL | |
| nickname | varchar(255) | YES | | NULL | |
| city | varchar(50) | YES | | NULL | |
| state | varchar(50) | YES | | NULL | |
| country | varchar(75) | YES | | NULL | |
| hide | tinyint(1) | YES | | NULL | |
| hendon_id | int(11) | YES | | NULL | |
| times_viewed | int(11) | YES | | NULL | |
| lifetime_winnings | int(11) | YES | | NULL | |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| featured | tinyint(1) | YES | | NULL | |
±------------------±-------------±-----±----±--------±---------------+

From the web, and from within the console things work fine. For example
I can do: Player.find(99) and it works great.

I’ve also got a web service setup. If I do the same thing through the
API, I get this an error “missing attribute: featured” (see log below).

If I drop that column, all is well. Moving it around doesn’t do any
good. Neither does renaming it. I’m completely baffled. I’m not doing
anything special with that column that I’m aware of…

???

Thanks!


Web Service Request: player.find_by_id(id=>99) Entrypoint: player

<?xml version="1.0" ?>player.find_by_id99

NoMethodError (missing attribute: featured):
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/casting.rb:125:in
cast_to_structured_type' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/support/signature_types.rb:206:ineach_member’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/support/signature_types.rb:205:in
each_member' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/casting.rb:124:incast_to_structured_type’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/casting.rb:60:in
cast' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/casting.rb:38:incast_returns’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/casting.rb:25:in
cast_returns' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/api.rb:193:incast_returns’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/dispatcher/abstract.rb:182:in
web_service_create_response' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/dispatcher/abstract.rb:59:inweb_service_invoke’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/dispatcher/abstract.rb:22:in
invoke_web_service_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:53:indispatch_web_service_request’
/usr/local/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:51:indispatch_web_service_request’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/scaffolding.rb:83:in
invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/scaffolding.rb:67:in
invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:inperform_action_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/local/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:inprocess_request’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:ineach_cgi’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:inprocess!’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
`process!’
/cpr/web/public/dispatch.fcgi:24


#2

I am an idiot.

Note to all. Check your cache stores first.

sigh