[Ironruby-core] mscorlib:0:in `ThrowArgumentException' error

Eduardo Blumenfeld lists at ruby-forum.com
Sun Aug 29 10:06:55 EDT 2010

Thank you Charles for the answer,

config is an active record produced list, an array of rows brought from 
a sql table that has one of its attributes (table column) => 

This is the portion of the code I'm using
config = Term.find_by_sql("sp_someStoredProc @someparameter=#{param1}")
config.each { |xx| if xx[:QuantityPer].nil? then nil else
if xx[:QuantityPer].include? '#{' then
 xxx = xx[:QuantityPer].to_s
 xxx = xxx[2..(xxx.size-2)]
 puts xxx
## error line
 xx[:QuantityPer] = eval(xxx)
## error line
 puts xx[:QuantityPer]
The error line line is the one I'm showing

While I was answering you, I think figured out the problem, (I have to 
test it though)

The problem has to do with the fact that the active record model has 
attr_readonly set as:
class Term < ActiveRecord::Base

What is puzzling to me is the cryptic error, not having a complete trace 
the troubling gem (in this case the active_record) with this kind of 

Thank you, Thank you

I will post the results of the test as soon as It works!

Eduardo Blumenfeld
Posted via http://www.ruby-forum.com/.

More information about the Ironruby-core mailing list