Open billsaysthis opened 14 years ago
I had the same issue. It is because in ruby 1.9, String#to_a no longer exists. I submitted a pull request for my fork at http://github.com/bananastalktome/rails_indexes which has the fix applied.
Fixed?
I maintaining plentz/lol_dba gem. It should work there :)
wgd1 $ rake db:index_migration --trace
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/lib/rails/plugin.rb:31) DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead. (called from load_tasks at /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/lib/rails/plugin.rb:31)
* Invoke db:index_migration (first_time) * Invoke environment (first_time) * Execute environment * Execute db:index_migration rake aborted! undefined method'
to_a' for "company_id":String /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:216:in
key_exists?' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:229:inblock (2 levels) in simple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:228:in
each' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:228:inblock in simple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:227:in
each' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:227:insimple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/indexer.rake:10:in
block (2 levels) in <top (required)>' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:incall' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in
block in execute' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:ineach' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:inblock in invoke_with_call_chain' /usr/local/lib/ruby/1.9.1/monitor.rb:190:in
mon_synchronize' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
block (2 levels) in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:ineach' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
block in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:inblock in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:inrun' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in
<top (required)>' /usr/local/bin/rake:19:inload' /usr/local/bin/rake:19:in