Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Open

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

billsaysthis opened this issue Mar 23, 2010 · 3 comments

Comments

@billsaysthis
Copy link

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

'

@bananastalktome
Copy link

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
Copy link

raid5 commented Feb 18, 2011

Fixed?

@plentz
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants