i just upgrade ruby from 1.8.5 to 1.8.6. And now i get an error when
i’m dealing with dates :
TypeError: can’t modify frozen string
/opt/local/lib/ruby/1.8/date/format.rb:105:in chomp!' /opt/local/lib/ruby/1.8/date/format.rb:105:inmethod_missing’
/opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse’
test = User.find 8
test.created_at
TypeError: can’t modify frozen string
from /opt/local/lib/ruby/1.8/date/format.rb:105:in chomp!' from /opt/local/lib/ruby/1.8/date/format.rb:105:inmethod_missing’
from /opt/local/lib/ruby/1.8/date/format.rb:963:in _parse' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/schema_definitions.rb: 114:instring_to_time’
from (eval):1:in `created_at’
from (irb):7
i just upgrade ruby from 1.8.5 to 1.8.6. And now i get an error when
i’m dealing with dates :
TypeError: can’t modify frozen string
/opt/local/lib/ruby/1.8/date/format.rb:105:in chomp!' /opt/local/lib/ruby/1.8/date/format.rb:105:inmethod_missing’
/opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse’
Does someone know where this error come from?
My memory is that some of the methods in the date/time classes in ruby
became private in 1.8.6. Rails 1.2.3 fixes this, but if you’re on an
earlier version this may be it.
My memory is that some of the methods in the date/time classes in ruby
became private in 1.8.6. Rails 1.2.3 fixes this, but if you’re on an
earlier version this may be it.
i’m on rails 1.2.3. maybe i should downgrade for a better
compatibilty.
I wouldn’t. It’s better to find and fix the problem. Can you show a
complete example, ideally from the application console?