Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

ActiveRecord::DuplicateMigrationNameError #23

Open
jsiragusa opened this issue Sep 22, 2016 · 3 comments
Open

ActiveRecord::DuplicateMigrationNameError #23

jsiragusa opened this issue Sep 22, 2016 · 3 comments

Comments

@jsiragusa
Copy link

jsiragusa commented Sep 22, 2016

I'm getting an ActiveRecord::DuplicateMigrationNameError during rake db:migrate

My steps are:

  • Add to Gemfile:
gem 'kaminari' # required by coupons
gem 'coupons', :git => 'https://github.com/fnando/coupons.git'
  • bundle install
  • rake coupons:install:migrations
  • rake db:migrate which generates the following error:
rake aborted!
ActiveRecord::DuplicateMigrationNameError: 

Multiple migrations have the name SetupCoupons

I only have new 1 migration file in db/migrate and none of my existing migrations have the name SetupCoupons.

Rails 4.2.6
Ruby 2.3.1p112
Bundler 1.12.5

@jsiragusa
Copy link
Author

#24 seems to fix it.

@NathanielGiron
Copy link

NathanielGiron commented Dec 1, 2016

Hi @jsiragusa I followed exactly your instructions and I tried looking for lib/coupons/engine.rb, did you generate that or do I have to copy it from this repo?

I am confused because I might have installed it wrong.

@jsiragusa
Copy link
Author

@NathanielGiron the lib/coupons/engine.rb is within this gem so you'd need to clone this repo and patch.

I forked this repo which includes PR #24 merged in: https://github.com/ImprintDev/coupons. If it's useful, you can simply use that fork by specifying gem 'coupons', :git => 'https://github.com/ImprintDev/coupons.git', :branch => 'master' in your Gemfile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants