merit-gem / merit

Reputation engine for Rails apps
Other
1.53k stars 198 forks source link

Observer may be causing UnknownAttributeError #107

Closed jraczak closed 11 years ago

jraczak commented 11 years ago

I'm getting an UnknownAttributeError after my app executes an action that has point_rules associated with it. Given the attribute complained about ("description") doesn't exist in my code, the only place I've been able to trace it to is some source code from Merit. Thanks for any insight!

Here's my output terminal output:

(0.5ms) COMMIT Redirected to http://localhost:3000/venues/7-fluffy-pillow-inn-foster-city-ca (0.1ms) BEGIN SQL (27.8ms) INSERT INTO "merit_actions" ("action_method", "action_value", "created_at", "had_errors", "processed", "target_id", "target_model", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" ["action_method", "create"], ["action_value", nil], ["created_at", Fri, 18 Oct 2013 00:10:06 UTC +00:00], ["had_errors", false], ["processed", false], ["target_id", 30], ["target_model", "venue_scores"], ["updated_at", Fri, 18 Oct 2013 00:10:06 UTC +00:00], ["user_id", 1] COMMIT Merit::Action Load (17.6ms) SELECT "merit_actions".* FROM "merit_actions" WHERE "merit_actions"."processed" = 'f' (0.1ms) BEGIN (0.3ms) UPDATE "merit_actions" SET "processed" = 't', "updated_at" = '2013-10-18 00:10:06.495846' WHERE "merit_actions"."id" = 29 (0.4ms) COMMIT User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Merit::Sash Load (0.2ms) SELECT "sashes".* FROM "sashes" WHERE "sashes"."id" = 1 LIMIT 1 VenueScore Load (0.3ms) SELECT "venue_scores".* FROM "venue_scores" WHERE "venue_scores"."id" = 30 LIMIT 1 Merit::Score Load (0.5ms) SELECT "merit_scores".* FROM "merit_scores" WHERE "merit_scores"."sash_id" = 1 AND "merit_scores"."category" = 'default' LIMIT 1 (0.1ms) BEGIN SQL (0.8ms) INSERT INTO "merit_score_points" ("created_at", "log", "num_points", "score_id") VALUES ($1, $2, $3, $4) RETURNING "id" ["created_at", Fri, 18 Oct 2013 00:10:06 UTC +00:00], ["log", "Manually granted"], ["num_points", 1], ["score_id", 1] COMMIT Completed 500 Internal Server Error in 652ms

ActiveRecord::UnknownAttributeError (unknown attribute: description): activerecord (3.2.2) lib/active_record/attribute_assignment.rb:88:in block in assign_attributes' activerecord (3.2.2) lib/active_record/attribute_assignment.rb:78:ineach' activerecord (3.2.2) lib/active_record/attribute_assignment.rb:78:in assign_attributes' activerecord (3.2.2) lib/active_record/base.rb:495:ininitialize' activerecord (3.2.2) lib/active_record/persistence.rb:44:in new' activerecord (3.2.2) lib/active_record/persistence.rb:44:increate' merit (1.6.1) lib/merit/observer.rb:6:in notify_observers' merit (1.6.1) lib/merit/judge.rb:30:inblock in apply_points' merit (1.6.1) lib/merit/judge.rb:28:in each' merit (1.6.1) lib/merit/judge.rb:28:inapply_points' merit (1.6.1) app/models/merit/action.rb:35:in block in check_rules' merit (1.6.1) app/models/merit/action.rb:33:ineach' merit (1.6.1) app/models/merit/action.rb:33:in check_rules' merit (1.6.1) app/models/merit/action.rb:27:incheck_all_rules' activerecord (3.2.2) lib/active_record/relation/delegation.rb:6:in map' activerecord (3.2.2) lib/active_record/relation/delegation.rb:6:inmap' merit (1.6.1) app/models/merit/action.rb:18:in check_unprocessed' merit (1.6.1) lib/merit/controller_extensions.rb:10:inblock in included' activesupport (3.2.2) lib/active_support/callbacks.rb:443:in block in _run__3917267564140782534__process_action__2526400415208731635__callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_3875' activesupport (3.2.2) lib/active_support/callbacks.rb:326:in around' activesupport (3.2.2) lib/active_support/callbacks.rb:310:in_callback_around_13' activesupport (3.2.2) lib/active_support/callbacks.rb:214:in _conditional_callback_around_3875' activesupport (3.2.2) lib/active_support/callbacks.rb:414:in_run3917267564140782534process_action2526400415208731635callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.2) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.2) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' activesupport (3.2.2) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.2) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:29:inprocess_action' actionpack (3.2.2) lib/action_controller/metal/params_wrapper.rb:205:in process_action' activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.2) lib/abstract_controller/base.rb:121:in process' actionpack (3.2.2) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.2) lib/action_controller/metal.rb:203:in dispatch' actionpack (3.2.2) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.2) lib/action_controller/metal.rb:246:in block in action' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:incall' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in dispatch' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:30:incall' journey (1.0.4) lib/journey/router.rb:68:in block in call' journey (1.0.4) lib/journey/router.rb:56:ineach' journey (1.0.4) lib/journey/router.rb:56:in call' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:incall' warden (1.2.3) lib/warden/manager.rb:35:in block in call' warden (1.2.3) lib/warden/manager.rb:34:incatch' warden (1.2.3) lib/warden/manager.rb:34:in call' actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.5) lib/rack/etag.rb:23:in call' rack (1.4.5) lib/rack/conditionalget.rb:35:incall' actionpack (3.2.2) lib/action_dispatch/middleware/head.rb:14:in call' actionpack (3.2.2) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:242:in call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:incontext' rack (1.4.5) lib/rack/session/abstract/id.rb:205:in call' actionpack (3.2.2) lib/action_dispatch/middleware/cookies.rb:338:incall' activerecord (3.2.2) lib/active_record/query_cache.rb:64:in call' activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:incall' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in block in call' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in_run2308985354070366058call3662409053721343290callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in_run_call_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (3.2.2) lib/action_dispatch/middleware/reloader.rb:65:in call' actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:incall' airbrake (3.1.14) lib/airbrake/rails/middleware.rb:13:in call' actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in call' railties (3.2.2) lib/rails/rack/logger.rb:26:incall_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:incall' rack (1.4.5) lib/rack/methodoverride.rb:21:in call' rack (1.4.5) lib/rack/runtime.rb:17:incall' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.4.5) lib/rack/lock.rb:15:incall' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in call' airbrake (3.1.14) lib/airbrake/user_informer.rb:16:in_call' airbrake (3.1.14) lib/airbrake/user_informer.rb:12:in call' railties (3.2.2) lib/rails/engine.rb:479:incall' railties (3.2.2) lib/rails/application.rb:220:in call' railties (3.2.2) lib/rails/railtie/configurable.rb:30:inmethod_missing' rack (1.4.5) lib/rack/deflater.rb:13:in call' rack (1.4.5) lib/rack/content_length.rb:14:incall' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in call' thin (1.5.1) lib/thin/connection.rb:81:inblock in pre_process' thin (1.5.1) lib/thin/connection.rb:79:in catch' thin (1.5.1) lib/thin/connection.rb:79:inpre_process' thin (1.5.1) lib/thin/connection.rb:54:in process' thin (1.5.1) lib/thin/connection.rb:39:inreceive_data' eventmachine (1.0.3) lib/eventmachine.rb:187:in run_machine' eventmachine (1.0.3) lib/eventmachine.rb:187:inrun' thin (1.5.1) lib/thin/backends/base.rb:63:in start' thin (1.5.1) lib/thin/server.rb:159:instart' rack (1.4.5) lib/rack/handler/thin.rb:13:in run' rack (1.4.5) lib/rack/server.rb:268:instart' railties (3.2.2) lib/rails/commands/server.rb:70:in start' railties (3.2.2) lib/rails/commands.rb:55:inblock in <top (required)>' railties (3.2.2) lib/rails/commands.rb:50:in tap' railties (3.2.2) lib/rails/commands.rb:50:in<top (required)>' script/rails:6:in require' script/rails:6:in

'

Rendered /Users/justin.raczak/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.3ms) Rendered /Users/justin.raczak/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0ms) Rendered /Users/justin.raczak/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.2ms)


And here is my Gemfile.lock

GIT remote: git://github.com/jraczak/state_select.git revision: 9303881fc9e0ada6350bb5a7f376eedaaf72ee6e specs: state_select (0.1.0)

GIT remote: https://github.com/jnicklas/capybara.git revision: 5d99d97775015cd5add209837307782f84a7a2a2 specs: capybara (2.1.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0)

GEM remote: http://rubygems.org/ specs: actionmailer (3.2.2) actionpack (= 3.2.2) mail (~> 2.4.0) actionpack (3.2.2) activemodel (= 3.2.2) activesupport (= 3.2.2) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.1) rack (~> 1.4.0) rack-cache (~> 1.1) rack-test (~> 0.6.1) sprockets (~> 2.1.2) activemodel (3.2.2) activesupport (= 3.2.2) builder (~> 3.0.0) activerecord (3.2.2) activemodel (= 3.2.2) activesupport (= 3.2.2) arel (~> 3.0.2) tzinfo (~> 0.3.29) activeresource (3.2.2) activemodel (= 3.2.2) activesupport (= 3.2.2) activesupport (3.2.2) i18n (~> 0.6) multi_json (~> 1.0) acts_as_audited (2.0.0) rails (>= 3.0.3) addressable (2.3.5) airbrake (3.1.14) builder json ambry (0.3.1) arel (3.0.2) aws-sdk (1.21.0) json (~> 1.4) nokogiri (>= 1.4.4, < 1.6.0) uuidtools (~> 2.1) bcrypt-ruby (3.1.2) builder (3.0.4) cancan (1.6.10) carrierwave (0.9.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) json (>= 1.7) choice (0.1.6) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.2) climate_control (>= 0.0.3, < 1.0) coderay (1.0.9) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.6.3) cucumber (1.3.8) builder (>= 2.1.2) diff-lcs (>= 1.1.3) gherkin (~> 2.12.1) multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.0.2) cucumber-rails (1.4.0) capybara (>= 1.1.2) cucumber (>= 1.2.0) nokogiri (>= 1.5.0) rails (>= 3.0.0) daemons (1.1.9) database_cleaner (1.2.0) devise (2.1.4) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) devise_invitable (1.1.8) actionmailer (~> 3.0) devise (>= 2.1.2) railties (~> 3.0) diff-lcs (1.1.3) ejs (1.0.0) email_spec (1.2.1) mail (~> 2.2) rspec (~> 2.0) ephemeral_response (0.4.0) erubis (2.7.0) eventmachine (1.0.3) excon (0.13.4) execjs (2.0.2) factory_girl (4.2.0) activesupport (>= 3.0.0) faraday (0.8.8) multipart-post (~> 1.2.0) ffi (1.9.0) fog (1.3.1) builder excon (~> 0.13.0) formatador (~> 0.2.0) mime-types multi_json (~> 1.0) net-scp (~> 1.0.4) net-ssh (>= 2.1.3) nokogiri (~> 1.5.0) ruby-hmac formatador (0.2.4) geocoder (1.1.8) gherkin (2.12.2) multi_json (~> 1.3) gmaps4rails (1.5.6) guard (1.8.3) formatador (>= 0.2.4) listen (~> 1.3) lumberjack (>= 1.0.2) pry (>= 0.9.10) thor (>= 0.14.6) guard-spin (0.3.0) guard spin has_scope (0.6.0.rc) actionpack (>= 3.2, < 5) activesupport (>= 3.2, < 5) hashie (2.0.5) heroku (2.26.3) heroku-api (~> 0.2.1) launchy (>= 0.3.2) netrc (~> 0.7.2) rest-client (~> 1.6.1) rubyzip heroku-api (0.2.1) excon (~> 0.13.3) hike (1.2.3) httpauth (0.2.0) i18n (0.6.5) inherited_resources (1.4.1) has_scope (~> 0.6.0.rc) responders (~> 1.0.0.rc) journey (1.0.4) jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.0) jwt (0.1.8) multi_json (>= 1.5) kumade (0.8.2) cocaine (>= 0.2.0) heroku (~> 2.0) rails (>= 2) rake (>= 0.8.7) launchy (2.3.0) addressable (~> 2.3) listen (1.3.1) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) rb-kqueue (>= 0.2) lumberjack (1.0.4) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) merit (1.6.1) ambry (~> 0.3.0) method_source (0.8.2) mime-types (1.25) multi_json (1.8.1) multi_test (0.0.2) multipart-post (1.2.0) net-scp (1.0.4) net-ssh (>= 1.99.1) net-ssh (2.7.0) netrc (0.7.7) newrelic_rpm (3.6.8.164) nokogiri (1.5.10) oauth2 (0.8.1) faraday (~> 0.8) httpauth (~> 0.1) jwt (~> 0.1.4) multi_json (~> 1.0) rack (~> 1.2) omniauth (1.1.4) hashie (>= 1.2, < 3) rack omniauth-facebook (1.4.1) omniauth-oauth2 (~> 1.1.0) omniauth-oauth2 (1.1.1) oauth2 (~> 0.8.0) omniauth (~> 1.0) orm_adapter (0.4.0) pg (0.17.0) pickle (0.4.11) cucumber (>= 0.8) rake polyglot (0.3.3) pr_geohash (1.0.0) pry (0.9.12.2) coderay (~> 1.0.5) method_source (~> 0.8) slop (~> 3.4) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) rack-ssl (1.3.3) rack rack-test (0.6.2) rack (>= 1.0) rails (3.2.2) actionmailer (= 3.2.2) actionpack (= 3.2.2) activerecord (= 3.2.2) activeresource (= 3.2.2) activesupport (= 3.2.2) bundler (~> 1.0) railties (= 3.2.2) rails-backbone (0.7.2) coffee-script (~> 2.2.0) ejs (~> 1.0.0) railties (>= 3.1.0) rails-erd (1.1.0) activerecord (>= 3.0) activesupport (>= 3.0) choice (~> 0.1.6) ruby-graphviz (~> 1.0.4) rails3-generators (1.0.0) railties (>= 3.0.0) railties (3.2.2) actionpack (= 3.2.2) activesupport (= 3.2.2) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) rake (10.1.0) rb-fsevent (0.9.3) rb-inotify (0.9.2) ffi (>= 0.5.0) rb-kqueue (0.2.0) ffi (>= 0.5.0) rdoc (3.12.2) json (~> 1.4) responders (1.0.0) railties (>= 3.2, < 5) rest-client (1.6.7) mime-types (>= 1.16) rmagick (2.13.2) rsolr (1.0.9) builder (>= 2.1.2) rspec (2.8.0) rspec-core (~> 2.8.0) rspec-expectations (~> 2.8.0) rspec-mocks (~> 2.8.0) rspec-core (2.8.0) rspec-expectations (2.8.0) diff-lcs (~> 1.1.2) rspec-mocks (2.8.0) rspec-rails (2.8.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) rspec (~> 2.8.0) ruby-graphviz (1.0.9) ruby-hmac (0.4.0) rubyzip (1.0.0) sass (3.2.12) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) shoulda (3.0.1) shoulda-context (~> 1.0.0) shoulda-matchers (~> 1.0.0) shoulda-context (1.0.2) shoulda-matchers (1.0.0) slim (2.0.1) temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) slim-rails (2.0.3) actionpack (>= 3.0, < 4.1) activesupport (>= 3.0, < 4.1) railties (>= 3.0, < 4.1) slim (~> 2.0) slop (3.4.6) spin (0.7.1) spork (0.9.2) sprockets (2.1.3) hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sunspot (2.0.0) pr_geohash (~> 1.0) rsolr (~> 1.0.7) sunspot_rails (2.0.0) nokogiri sunspot (= 2.0.0) sunspot_solr (2.0.0) temple (0.6.7) thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.14.6) tilt (1.4.1) timecop (0.6.3) treetop (1.4.15) polyglot polyglot (>= 0.3.1) tzinfo (0.3.38) uglifier (2.2.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) uuidtools (2.1.4) warden (1.2.3) rack (>= 1.0) will_paginate (3.0.5) xpath (2.0.0) nokogiri (~> 1.3)

PLATFORMS ruby

DEPENDENCIES acts_as_audited (= 2.0.0) airbrake aws-sdk cancan capybara! carrierwave coffee-rails (~> 3.2.1) cucumber-rails database_cleaner devise (~> 2.1.0) devise_invitable (~> 1.1.0) ejs email_spec (~> 1.2.1) ephemeral_response factory_girl fog (~> 1.3.1) geocoder gmaps4rails guard-spin heroku inherited_resources jquery-rails kumade launchy merit newrelic_rpm omniauth-facebook pg pickle pry rails (= 3.2.2) rails-backbone (~> 0.7.0) rails-erd rails3-generators rmagick (~> 2.13.2) rspec-rails (~> 2.8.0) ruby-graphviz sass-rails (~> 3.2.3) shoulda (~> 3.0.0.beta2) slim-rails spin spork (~> 0.9.0.rc) state_select! sunspot_rails sunspot_solr thin timecop uglifier (>= 1.0.3) will_paginate (~> 3.0.0)

tute commented 11 years ago

That is indeed weird. Can you please paste in your schema file as well? Thanks for reporting.

jraczak commented 11 years ago

@tute - Here is my schema.rb

ActiveRecord::Schema.define(:version => 20130803234933) do

create_table "audits", :force => true do |t| t.integer "auditable_id" t.string "auditable_type" t.integer "associated_id" t.string "associated_type" t.integer "user_id" t.string "user_type" t.string "username" t.string "action" t.text "audited_changes" t.integer "version", :default => 0 t.string "comment" t.string "remote_address" t.datetime "created_at" end

add_index "audits", ["associated_id", "associated_type"], :name => "associated_index" add_index "audits", ["auditable_id", "auditable_type"], :name => "auditable_index" add_index "audits", ["created_at"], :name => "index_audits_on_created_at" add_index "audits", ["user_id", "user_type"], :name => "user_index"

create_table "badges_sashes", :force => true do |t| t.integer "badge_id" t.integer "sash_id" t.boolean "notified_user", :default => false t.datetime "created_at" end

add_index "badges_sashes", ["badge_id", "sash_id"], :name => "index_badges_sashes_on_badge_id_and_sash_id" add_index "badges_sashes", ["badge_id"], :name => "index_badges_sashes_on_badge_id" add_index "badges_sashes", ["sash_id"], :name => "index_badges_sashes_on_sash_id"

create_table "follows", :force => true do |t| t.integer "follower_id" t.integer "followed_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

add_index "follows", ["followed_id"], :name => "index_follows_on_followed_id" add_index "follows", ["follower_id"], :name => "index_follows_on_follower_id"

create_table "lists", :force => true do |t| t.integer "user_id" t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.text "description" end

add_index "lists", ["user_id"], :name => "index_lists_on_user_id"

create_table "lists_venues", :id => false, :force => true do |t| t.integer "list_id" t.integer "venue_id" end

add_index "lists_venues", ["list_id"], :name => "index_lists_venues_on_list_id" add_index "lists_venues", ["venue_id"], :name => "index_lists_venues_on_venue_id"

create_table "merit_actions", :force => true do |t| t.integer "user_id" t.string "action_method" t.integer "action_value" t.boolean "had_errors", :default => false t.string "target_model" t.integer "target_id" t.boolean "processed", :default => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

create_table "merit_activity_logs", :force => true do |t| t.integer "action_id" t.string "related_change_type" t.integer "related_change_id" t.string "descrption" t.datetime "created_at" end

create_table "merit_score_points", :force => true do |t| t.integer "score_id" t.integer "num_points", :default => 0 t.string "log" t.datetime "created_at" end

create_table "merit_scores", :force => true do |t| t.integer "sash_id" t.string "category", :default => "default" end

create_table "sashes", :force => true do |t| t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

create_table "tags", :force => true do |t| t.integer "tag_category_id" t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "venue_category_tag_set_id" t.integer "venue_subcategory_tag_set_id" end

add_index "tags", ["name"], :name => "index_tags_on_name" add_index "tags", ["tag_category_id"], :name => "index_tags_on_tag_category_id"

create_table "tags_venues", :id => false, :force => true do |t| t.integer "tag_id" t.integer "venue_id" end

add_index "tags_venues", ["tag_id"], :name => "index_tags_venues_on_tag_id" add_index "tags_venues", ["venue_id"], :name => "index_tags_venues_on_venue_id"

create_table "tip_likes", :force => true do |t| t.integer "tip_id" t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

add_index "tip_likes", ["tip_id"], :name => "index_tip_likes_on_tip_id" add_index "tip_likes", ["user_id"], :name => "index_tip_likes_on_user_id"

create_table "tips", :force => true do |t| t.integer "venue_id" t.integer "user_id" t.string "text" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "tip_likes_count", :default => 0 end

add_index "tips", ["user_id"], :name => "index_tips_on_user_id" add_index "tips", ["venue_id"], :name => "index_tips_on_venue_id"

create_table "users", :force => true do |t| t.string "email", :default => "", :null => false t.string "encrypted_password", :default => "" t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", :default => 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.string "first_name" t.string "last_name" t.string "birth_month" t.integer "birth_day" t.boolean "admin", :default => false t.string "username" t.string "zip_code" t.integer "failed_attempts", :default => 0 t.string "unlock_token" t.datetime "locked_at" t.string "lock_reason" t.string "gender" t.integer "facebook_id" t.string "bio" t.string "twitter_username" t.string "permalink" t.integer "sash_id" t.integer "level", :default => 0 t.string "invitation_token", :limit => 60 t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.integer "invitation_limit" t.integer "invited_by_id" t.string "invited_by_type" t.string "home_state" t.string "home_city" end

add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["facebook_id"], :name => "index_users_on_facebook_id" add_index "users", ["invitation_token"], :name => "index_users_on_invitation_token", :unique => true add_index "users", ["invited_by_id"], :name => "index_users_on_invited_by_id" add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true

create_table "venue_categories", :force => true do |t| t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.string "prompt1" t.string "prompt2" t.string "prompt3" t.string "prompt4" end

create_table "venue_category_tag_sets", :force => true do |t| t.integer "venue_category_id" t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

create_table "venue_images", :force => true do |t| t.string "image_file" t.string "caption" t.integer "venue_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "user_id" end

add_index "venue_images", ["venue_id"], :name => "index_venue_images_on_venue_id"

create_table "venue_scores", :force => true do |t| t.integer "venue_id" t.integer "user_id" t.integer "computed_score" t.integer "score1" t.integer "score2" t.integer "score3" t.integer "score4" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

add_index "venue_scores", ["user_id"], :name => "index_venue_scores_on_user_id" add_index "venue_scores", ["venue_id"], :name => "index_venue_scores_on_venue_id"

create_table "venue_snapshots", :force => true do |t| t.integer "venue_id" t.integer "venue_score_count" t.integer "tip_count" t.integer "current_crowdscore" t.integer "score_breakdown1" t.integer "score_breakdown2" t.integer "score_breakdown3" t.integer "score_breakdown4" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

create_table "venue_subcategories", :force => true do |t| t.integer "venue_category_id" t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

add_index "venue_subcategories", ["venue_category_id"], :name => "index_venue_subcategories_on_venue_category_id"

create_table "venue_subcategory_tag_sets", :force => true do |t| t.integer "venue_subcategory_id" t.string "name" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end

create_table "venues", :force => true do |t| t.string "name" t.string "address1" t.string "address2" t.string "city" t.string "state" t.string "zip" t.string "phone" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "venue_category_id" t.string "url" t.integer "venue_subcategory_id" t.boolean "active", :default => true t.integer "computed_score" t.float "latitude" t.float "longitude" t.string "factual_id" end

add_index "venues", ["venue_category_id"], :name => "index_venues_on_venue_category_id" add_index "venues", ["venue_subcategory_id"], :name => "index_venues_on_venue_subcategory_id"

end

tute commented 11 years ago

Somehow there's a typo in your merit_activity_logs table, a column reads descrption (needs an "i"). Add a migration to rename it, and it will work. Best!

jraczak commented 11 years ago

Brilliant! That update and a server restart fixed this one. Thanks so much!