{"action":"created","issue":{"url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/29","labels_url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/29/comments","events_url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/29/events","html_url":"https://github.com/byroot/activerecord-typedstore/issues/29","id":56720325,"number":29,"title":"Rails 4.2 Test Crash","user":{"login":"CyborgMaster","id":1882579,"avatar_url":"https://avatars.githubusercontent.com/u/1882579?v=3","gravatar_id":"","url":"https://api.github.com/users/CyborgMaster","html_url":"https://github.com/CyborgMaster","followers_url":"https://api.github.com/users/CyborgMaster/followers","following_url":"https://api.github.com/users/CyborgMaster/following{/other_user}","gists_url":"https://api.github.com/users/CyborgMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/CyborgMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyborgMaster/subscriptions","organizations_url":"https://api.github.com/users/CyborgMaster/orgs","repos_url":"https://api.github.com/users/CyborgMaster/repos","events_url":"https://api.github.com/users/CyborgMaster/events{/privacy}","received_events_url":"https://api.github.com/users/CyborgMaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-05T19:54:23Z","updated_at":"2015-02-05T22:20:42Z","closed_at":null,"body":"I just upgraded our project to Rails 4.2 and now I'm getting the following crash when creating objects in our tests.  I'm still digging into it, but I thought I would post here in case anyone had seen this before.\r\n\r\n```\r\nNoMethodError: undefined method `cast_type' for nil:NilClass\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-typedstore-0.5.1/lib/active_record/typed_store/extension.rb:132:in `coder_for'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-typedstore-0.5.1/lib/active_record/typed_store/extension.rb:142:in `write_attribute'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-4.2.0/lib/active_record/associations/belongs_to_association.rb:80:in `replace_keys'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-4.2.0/lib/active_record/associations/belongs_to_association.rb:14:in `replace'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-4.2.0/lib/active_record/associations/singular_association.rb:17:in `writer'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:123:in `patient='\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/lathe.rb:56:in `assign_attribute'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/lathe.rb:16:in `block in initialize'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/lathe.rb:16:in `each'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/lathe.rb:16:in `initialize'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/blueprint.rb:24:in `new'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/blueprint.rb:24:in `make'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/active_record/blueprint.rb:6:in `make!'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/machinable.rb:52:in `block in make!'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/machinable.rb:88:in `decode_args_to_make'\r\n/Users/jeremy/.rvm/gems/ruby-2.0.0-p451@allynova/bundler/gems/machinist-bebd6491b2ee/lib/machinist/machinable.rb:50:in `make!'\r\n```"},"comment":{"url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/comments/73142473","html_url":"https://github.com/byroot/activerecord-typedstore/issues/29#issuecomment-73142473","issue_url":"https://api.github.com/repos/byroot/activerecord-typedstore/issues/29","id":73142473,"user":{"login":"CyborgMaster","id":1882579,"avatar_url":"https://avatars.githubusercontent.com/u/1882579?v=3","gravatar_id":"","url":"https://api.github.com/users/CyborgMaster","html_url":"https://github.com/CyborgMaster","followers_url":"https://api.github.com/users/CyborgMaster/followers","following_url":"https://api.github.com/users/CyborgMaster/following{/other_user}","gists_url":"https://api.github.com/users/CyborgMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/CyborgMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyborgMaster/subscriptions","organizations_url":"https://api.github.com/users/CyborgMaster/orgs","repos_url":"https://api.github.com/users/CyborgMaster/repos","events_url":"https://api.github.com/users/CyborgMaster/events{/privacy}","received_events_url":"https://api.github.com/users/CyborgMaster/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T22:20:42Z","updated_at":"2015-02-05T22:20:42Z","body":"Oh ok.  Thanks!  Sorry.  I just wanted to make sure it was actually the\nsolution to my problem before I pushed it your way.  At this point, I'm 90%\nsure it is, so go for it.\n\n- Jeremy\n\nOn Thu, Feb 5, 2015 at 3:19 PM, Jean Boussier <notifications@github.com>\nwrote:\n\n> Then don't worry it will be faster if I do :)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/byroot/activerecord-typedstore/issues/29#issuecomment-73142211>\n> .\n>\n"}}