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

Cyril Mougel cyril.mougel at gmail.com
Wed Mar 11 17:05:30 EDT 2009


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



More information about the Typo-list mailing list