Forum: Typo 745e4ee7fc9f68c985ab7f87d072b89cf90b858d and the commit before that break migrations for me

Posted by Tobias Weisserth (polarapfel)
on 2009-03-11 20:30
(Received via mailing list)
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?

Thanks,

Tobias
Posted by Cyril Mougel (shingara)
on 2009-03-11 22:17
(Received via mailing list)
Tobias Weisserth a écrit :
> ** Execute db:migrate
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in 
> `up_without_benchmarks'
> `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 
> /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617: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:2036:in 
> /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/08055c37fca724ca...

--
Cyril Mougel
http://blog.shingara.fr
Posted by Tobias Weisserth (polarapfel)
on 2009-03-12 20:12
(Received via mailing list)
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
Posted by Tobias Weisserth (polarapfel)
on 2009-03-12 20:41
(Received via mailing list)
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 <
Posted by Cyril Mougel (shingara)
on 2009-03-12 21:17
(Received via mailing list)
Tobias Weisserth a écrit :
> 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.
Your right

I fix problem  in commit  4720de1

Really sorry.

--
Cyril Mougel
http://blog.shingara.fr
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.