Associations 4-2

task: In the routes file, add a new route that maps requests to /tags to the Tags controller’s index action.
my code: ```
Rails.application.routes.draw do
get ‘/tags’ => ‘tags#index’

error: /var/lib/gems/2.0.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:389:in `check_pending!':  (ActiveRecord::PendingMigrationError)
I can't remember how to do this and Google is no help

Hi @poisonparty,


You need to migrate the database:

$ rake db:migrate

When I do that I get: LoadError: You have already activated rake 10.4.2 but your Gem file requires rake 10.3.2.

@poisonparty Sounds like an issue with Codecademy. Does it work if you use this instead?

$ bundle exec rake db:migrate

I tried that and got the error “rake aborted! ActiveRecord::DuplicateMigrationNameError” so I think the error is that I have multiple files in the migration folder for the same thing (for lack of a better word) ie two [numbers]_create_tags.rb.
So my new question is would it be easier to delete the duplicates or start over?

I’ve found the restart exercise feature. Hopefully this solves it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.