[typo] 745e4ee7fc9f68c985ab7f87d072b89cf90b858d and the commit before that break migrations for me

Tobias Weisserth tobias.weisserth at gmail.com
Thu Mar 12 14:54:00 EDT 2009


I took a look at the migration and a quick workaround is to delete
"path_cache" manually. The migration will then not be stuck around line 12.
It doesn't solve the bug though.

On Fri, Mar 13, 2009 at 12:11 AM, Tobias Weisserth <
tobias.weisserth at gmail.com> wrote:

> I might be missing something, but migration 81 will still not work.
>
> This time it complains:
>
> rake --trace db:migrate
> (in /home/tweisser/workspace/typo/typo)
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute db:migrate
> ==  CreateCacheInformations: migrating
> ========================================
> rake aborted!
> An error has occurred, all later migrations canceled:
>
> uninitialized constant CreateCacheInformations::PageCage
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
> `const_missing'
>
> ./db/migrate//081_create_cache_informations.rb:12:in
> `up_without_benchmarks'
> ./db/migrate//081_create_cache_informations.rb:11:in `each'
> ./db/migrate//081_create_cache_informations.rb:11:in
> `up_without_benchmarks'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
> `send'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
> `migrate'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/1.8/benchmark.rb:293:in
> `measure'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
> `migrate'
> (__DELEGATION__):2:in `__send__'
> (__DELEGATION__):2:in `migrate'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in
> `migrate'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in
> `call'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in
> `ddl_transaction'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in
> `migrate'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in
> `each'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in
> `migrate'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in
> `up'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in
> `migrate'
>
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
> `call'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
> `execute'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
> `each'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
> `execute'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in
> `invoke_with_call_chain'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/1.8/monitor.rb:242:in
> `synchronize'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
> `invoke_with_call_chain'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in
> `invoke'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in
> `invoke_task'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
> `top_level'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
> `each'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
> `top_level'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
> `standard_exception_handling'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
> `top_level'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in
> `run'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
> `standard_exception_handling'
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in
> `run'
>
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
> /opt/ruby-enterprise/bin/rake:19:in `load'
> /opt/ruby-enterprise/bin/rake:19
>
> ---
>
> PageCache doesn't seem to be initialized or rather it can't find the class?
>
> Is there anything else I need to do/run after pulling and before migrating?
>
> Thanks,
>
> Tobias
>
>
> On Thu, Mar 12, 2009 at 2:35 AM, Cyril Mougel <cyril.mougel at gmail.com>wrote:
>
>> Tobias Weisserth a écrit :
>>
>>  Hi there,
>>>
>>> I just pulled from github (see subject). Migrations are having trouble.
>>> Full trace following:
>>>
>>> rake --trace db:migrate
>>> (in /home/tweisser/workspace/typo/typo)
>>> ** Invoke db:migrate (first_time)
>>> ** Invoke environment (first_time)
>>> ** Execute environment
>>> ** Execute db:migrate
>>> ==  CreateCacheInformations: migrating
>>> ========================================
>>> -- public_path()
>>> rake aborted!
>>> An error has occurred, all later migrations canceled:
>>>
>>> undefined method `public_path' for
>>> #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0x9b87f64>
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in
>>> `send'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in
>>> `method_missing'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in
>>> `say_with_time'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/1.8/benchmark.rb:293:in
>>> `measure'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in
>>> `say_with_time'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in
>>> `method_missing'
>>> ./db/migrate//081_create_cache_informations.rb:12:in
>>> `up_without_benchmarks'
>>> ./db/migrate//081_create_cache_informations.rb:11:in `each'
>>> ./db/migrate//081_create_cache_informations.rb:11:in
>>> `up_without_benchmarks'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
>>> `send'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
>>> `migrate'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/1.8/benchmark.rb:293:in
>>> `measure'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in
>>> `migrate'
>>> (__DELEGATION__):2:in `__send__'
>>> (__DELEGATION__):2:in `migrate'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in
>>> `migrate'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in
>>> `call'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in
>>> `ddl_transaction'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in
>>> `migrate'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in
>>> `each'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in
>>> `migrate'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in
>>> `up'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in
>>> `migrate'
>>>
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
>>> `call'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
>>> `execute'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
>>> `each'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
>>> `execute'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in
>>> `invoke_with_call_chain'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/1.8/monitor.rb:242:in
>>> `synchronize'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
>>> `invoke_with_call_chain'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in
>>> `invoke'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in
>>> `invoke_task'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
>>> `top_level'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
>>> `each'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
>>> `top_level'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
>>> `standard_exception_handling'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
>>> `top_level'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in
>>> `run'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
>>> `standard_exception_handling'
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in
>>> `run'
>>>
>>> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
>>> /opt/ruby-enterprise/bin/rake:19:in `load'
>>> /opt/ruby-enterprise/bin/rake:19
>>>
>>> Going back and forth through migrations up until 80 works fine though.
>>>
>>> Any idea? Should I open a ticket or is this specific to my setup?
>>>
>>
>> Sorry for this mistake.
>>
>> I fix it in commit :
>>
>> http://github.com/fdv/typo/commit/08055c37fca724ca495f91c59a1d37eeab2f343a
>>
>> --
>> Cyril Mougel
>> http://blog.shingara.fr
>>
>> _______________________________________________
>> Typo-list mailing list
>> Typo-list at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/typo-list
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/typo-list/attachments/20090313/4342232b/attachment.html>


More information about the Typo-list mailing list