ashbb/green_shoes — Issue #56: Green shoes seems to conflict with ActiveRecord models
Author: mohawkjohn
Created: 2011-11-16 23:28:58+00:00
State: open

I'm trying to use SciRuby::Plotter (a Green Shoes GUI) with Rails 3.1.1. I have a method on one of my models called `update!`, which sends an HTTP request to get some meta info, and then applies that meta info to the object (and saves). This happens within a transaction.

(1.0ms) BEGIN
(1.3ms) SELECT 1 FROM "genes" WHERE ("genes"."entrez_id" = 54101 AND "genes"."id" != 177592) LIMIT 1
(24.8ms) UPDATE "genes" SET "symbol" = 'RIPK4', "name" = 'receptor-interacting serine-threonine kinase 4', "desc" = 'The protein encoded by this gene is a serine/threonine protein kinase that interacts with protein kinase C-delta. The encoded protein can also activate NFkappaB and is required for keratinocyte differentiation. This kinase undergoes autophosphorylation. [provided by RefSeq, Jul 2008]', "updated_at" = '2011-11-16 23:20:46.130810' WHERE "genes"."id" = 177592
(1.2ms) COMMIT
NOTICE: there is no transaction in progress
(1.1ms) ROLLBACK
NoMethodError: undefined method `clear' for #
from /usr/local/lib/ruby/gems/1.9.1/gems/activemodel-3.1.1/lib/active_model/attribute_methods.rb:385:in `method_missing'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_record/attribute_methods.rb:60:in `method_missing'
from /usr/local/lib/ruby/gems/1.9.1/gems/green_shoes-1.0.309/lib/shoes/ruby.rb:155:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/green_shoes-1.0.309/lib/shoes/ruby.rb:155:in `clear'
from /usr/local/lib/ruby/gems/1.9.1/gems/green_shoes-1.0.309/lib/shoes/ruby.rb:155:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/green_shoes-1.0.309/lib/shoes/ruby.rb:155:in `clear'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:374:in `rollback_transaction_records'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:230:in `rescue in transaction'

I think there must be a conflict between `lib/shoes/ruby.rb`'s `Array` modification and ActiveRecord.

I will try to gather some more data.