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:in `method_missing'' /opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse'' Does someone know where this error come from? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2007-Aug-21 02:52 UTC
Re: TypeError: can''t modify frozen string in 1.8.6
> 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:in `method_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. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i''m on rails 1.2.3. maybe i should downgrade for a better compatibilty. On Aug 21, 4:52 am, Philip Hallstrom <ra...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > 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:in `method_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.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2007-Aug-21 11:55 UTC
Re: TypeError: can''t modify frozen string in 1.8.6
Hi -- On Tue, 21 Aug 2007, Jean-Sbastien wrote:> On Aug 21, 4:52 am, Philip Hallstrom <ra...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >>> 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:in `method_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. > > > 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? David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
from ./script/console :>> test = User.find 8 >> test.created_atTypeError: 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:in `method_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:in `string_to_time'' from (eval):1:in `created_at'' from (irb):7 it is not really verbose, but it''s all i get. On Aug 21, 1:55 pm, dbl...-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org wrote:> Hi -- > > > > On Tue, 21 Aug 2007, Jean-Sébastien wrote: > > On Aug 21, 4:52 am, Philip Hallstrom <ra...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > >>> 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:in `method_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. > > > 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? > > David > > -- > * Books: > RAILS ROUTING (new!http://www.awprofessional.com/title/0321509242) > RUBY FOR RAILS (http://www.manning.com/black) > * Ruby/Rails training > & consulting: Ruby Power and Light, LLC (http://www.rubypal.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i just find a related topic : http://www.ruby-forum.com/topic/105957 i''ll try to patch format.rb and tell if it works for me too. On Aug 21, 3:48 pm, Jean-Sébastien <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> from ./script/console :>> 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:in > `method_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:in `string_to_time'' > from (eval):1:in `created_at'' > from (irb):7 > > it is not really verbose, but it''s all i get. > > On Aug 21, 1:55 pm, dbl...-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org wrote: > > > Hi -- > > > On Tue, 21 Aug 2007, Jean-Sébastien wrote: > > > On Aug 21, 4:52 am, Philip Hallstrom <ra...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > > >>> 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:in `method_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. > > > > 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? > > > David > > > -- > > * Books: > > RAILS ROUTING (new!http://www.awprofessional.com/title/0321509242) > > RUBY FOR RAILS (http://www.manning.com/black) > > * Ruby/Rails training > > & consulting: Ruby Power and Light, LLC (http://www.rubypal.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i confirm that it works with this fix... On Aug 22, 1:56 am, Jean-Sébastien <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i just find a related topic :http://www.ruby-forum.com/topic/105957 > i''ll try to patch format.rb and tell if it works for me too. > > On Aug 21, 3:48 pm, Jean-Sébastien <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > from ./script/console :>> 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:in > > `method_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:in `string_to_time'' > > from (eval):1:in `created_at'' > > from (irb):7 > > > it is not really verbose, but it''s all i get. > > > On Aug 21, 1:55 pm, dbl...-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org wrote: > > > > Hi -- > > > > On Tue, 21 Aug 2007, Jean-Sébastien wrote: > > > > On Aug 21, 4:52 am, Philip Hallstrom <ra...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > > > >>> 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:in `method_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. > > > > > 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? > > > > David > > > > -- > > > * Books: > > > RAILS ROUTING (new!http://www.awprofessional.com/title/0321509242) > > > RUBY FOR RAILS (http://www.manning.com/black) > > > * Ruby/Rails training > > > & consulting: Ruby Power and Light, LLC (http://www.rubypal.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---