Strange frozen string problem starting rails



I am experiencing a very strange problem with my Rails installation. I’m
using ruby 1.8.6 on Debian Linux, with edge rails.

Whenever I try to start mongrel, I get an exception about “can’t modify
frozen string”. I get a similar exception when I try to do “rake
db:migrate”. In this case, the exception seems to pop up after the
migrations do succesfully run.

The problem seems similar to the one described at, except the user
there is running Windows and I am running Linux.

Most mysteriously, other members of my development team do not
experience this problem.

Here is a stack trace of the exception:

mlc@coconut:~/src/$ rake --trace db:migrate
(in /home/mlc/src/
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake aborted!
can’t modify frozen string
/usr/lib/ruby/1.8/date/format.rb:105:in chomp!' /usr/lib/ruby/1.8/date/format.rb:105:inmethod_missing’
/usr/lib/ruby/1.8/date/format.rb:963:in _parse' /home/mlc/src/’
type_cast' /home/mlc/src/’
initialize' /home/mlc/src/’
columns' /home/mlc/src/’
columns' /home/mlc/src/’
tables' /home/mlc/src/’
tables' /home/mlc/src/’
dump' /home/mlc/src/’
call' /usr/lib/ruby/1.8/rake.rb:387:inexecute’
/usr/lib/ruby/1.8/rake.rb:387:in each' /usr/lib/ruby/1.8/rake.rb:387:inexecute’
/usr/lib/ruby/1.8/rake.rb:357:in invoke' /usr/lib/ruby/1.8/rake.rb:350:insynchronize’
/usr/lib/ruby/1.8/rake.rb:350:in invoke' /home/mlc/src/ /usr/lib/ruby/1.8/rake.rb:387:incall’
/usr/lib/ruby/1.8/rake.rb:387:in execute' /usr/lib/ruby/1.8/rake.rb:387:ineach’
/usr/lib/ruby/1.8/rake.rb:387:in execute' /usr/lib/ruby/1.8/rake.rb:357:ininvoke’
/usr/lib/ruby/1.8/rake.rb:350:in synchronize' /usr/lib/ruby/1.8/rake.rb:350:ininvoke’
/usr/lib/ruby/1.8/rake.rb:1906:in run' /usr/lib/ruby/1.8/rake.rb:1906:ineach’
/usr/lib/ruby/1.8/rake.rb:1906:in `run’

Any help would be very greatly appreciated. Let me know if I can provide
any more information.


mike castleman wrote:

can’t modify frozen string
/usr/lib/ruby/1.8/date/format.rb:105:in chomp!' /usr/lib/ruby/1.8/date/format.rb:105:inmethod_missing’
/usr/lib/ruby/1.8/date/format.rb:963:in `_parse’

ok, so I managed to work around the problem by patching
/usr/lib/ruby/1.8/date/format.rb as shown below. anyone who can tell me
why this was necessary will be my new hero.

— format.rb.orig 2007-04-24 18:41:28.820600021 -0400
+++ format.rb 2007-04-24 18:40:50.362196521 -0400
@@ -101,7 +101,7 @@

   def method_missing(t, *args, &block)
  •   t = t.to_s
  •   t =
      set = t.chomp!('=')
      t = t.intern
      if set