eladmeidar / rails_indexes

A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.
http://blog.eizesus.com/2009/9/find-where-to-index-your-tables-on-a-rails-app/
MIT License
490 stars 35 forks source link

Rails 3.1.1 Indexer problem? #24

Open kjudge opened 12 years ago

kjudge commented 12 years ago

Wanted to give this gem a try to tune up my queries, but I get the following error:

White-Dome:server kevin$ rake db:index_migration /Users/kevin/.rvm/gems/ruby-1.9.2-p136/gems/rails-indexes-0.0.1/lib/rails-indexes/indexer.rb:332: warning: else without rescue is useless rake aborted! Don't know how to build task 'db:index_migration'

(See full trace by running task with --trace) White-Dome:server kevin$ bundle exec rake -T db /Users/kevin/.rvm/gems/ruby-1.9.2-p136/gems/rails-indexes-0.0.1/lib/rails-indexes/indexer.rb:332: warning: else without rescue is useless rake db:create # Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config) rake db:drop # Drops the database for the current Rails.env (use db:drop:all to drop all databases) rake db:fixtures:load # Load fixtures into the current environment's database. rake db:migrate # Migrate the database (options: VERSION=x, VERBOSE=false). rake db:migrate:status # Display status of migrations rake db:rollback # Rolls the schema back to the previous version (specify steps w/ STEP=n). rake db:schema:dump # Create a db/schema.rb file that can be portably used against any DB supported by AR rake db:schema:load # Load a schema.rb file into the database rake db:seed # Load the seed data from db/seeds.rb rake db:setup # Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first) rake db:structure:dump # Dump the database structure to an SQL file rake db:version # Retrieves the current schema version number

luiscruz commented 12 years ago

I'm having the same problem...

plentz commented 12 years ago

Maybe you guys want to give plentz/lol_dba a try :)