Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

undefined method `to_a' for "company_id":String (Rails 3 app) #15

Open
billsaysthis opened this Issue Mar 23, 2010 · 3 comments

Comments

Projects
None yet
4 participants

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:inkey_exists?'
/Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:229:in block (2 levels) in simple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:228:ineach'
/Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:228:in block in simple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:227:ineach'
/Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/../lib/indexer.rb:227:in simple_migration' /Users/billlazar/Sites/wested/wgg/wgd1/vendor/plugins/rails_indexes/tasks/indexer.rake:10:inblock (2 levels) in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in call' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:inblock in execute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in block in invoke_with_call_chain' /usr/local/lib/ruby/1.9.1/monitor.rb:190:inmon_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:inblock (2 levels) in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:inblock in top_level'
/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:2023:intop_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in block in run' /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:1998:in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in<top (required)>'
/usr/local/bin/rake:19:in load' /usr/local/bin/rake:19:in

'

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.

raid5 commented Feb 18, 2011

Fixed?

Contributor

plentz commented Apr 29, 2012

I maintaining plentz/lol_dba gem. It should work there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment