Your code freezing on the self.target.save line, made me think you had a 
before_save filter. The Building.find(1008631573) freezing makes me think that 
there's something un-vanilla about your rails install. 

Try removing all plugins, gems and any initializers that you have and see if 
the problem goes away. If that doesn't work, create a fresh rails project and 
add your model code and see if the new project has any problems.

Does your model have any methods in it that are declared in AR::Base ?

Luke

On 2010-10-02, at 4:47 AM, Heinz Strunk wrote:

> Hello,
> 
> eversince I switched to Rails 3 I keep getting following error:
> RuntimeError: can't modify frozen hash
> 
> This is the affected line:
> self.target.save
> 
> target is a polymorphic relation and never caused any problems before.
> 
> I added an output for the frozen hash to get the ID of it and fired up
> the console to get some more info out of it:
> ruby-1.9.2-p0 > b = Building.find(1008631573)
> 
> And nothing happens. It stays there until I abort it.
> 
> Does anyone know how I could find the source of this problem?
> 
> Thanks
> -- 
> Posted via http://www.ruby-forum.com/.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to