{"action":"opened","issue":{"url":"https://api.github.com/repos/felipediesel/auto_increment/issues/5","labels_url":"https://api.github.com/repos/felipediesel/auto_increment/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/felipediesel/auto_increment/issues/5/comments","events_url":"https://api.github.com/repos/felipediesel/auto_increment/issues/5/events","html_url":"https://github.com/felipediesel/auto_increment/issues/5","id":72445247,"number":5,"title":"Arbitrary migrations raise NameError","user":{"login":"kyledcline","id":5748469,"avatar_url":"https://avatars.githubusercontent.com/u/5748469?v=3","gravatar_id":"","url":"https://api.github.com/users/kyledcline","html_url":"https://github.com/kyledcline","followers_url":"https://api.github.com/users/kyledcline/followers","following_url":"https://api.github.com/users/kyledcline/following{/other_user}","gists_url":"https://api.github.com/users/kyledcline/gists{/gist_id}","starred_url":"https://api.github.com/users/kyledcline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyledcline/subscriptions","organizations_url":"https://api.github.com/users/kyledcline/orgs","repos_url":"https://api.github.com/users/kyledcline/repos","events_url":"https://api.github.com/users/kyledcline/events{/privacy}","received_events_url":"https://api.github.com/users/kyledcline/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-01T14:38:14Z","updated_at":"2015-05-01T14:38:14Z","closed_at":null,"body":"After bundling auto_increment and calling it as a class method in a model, any further arbitrary (and unrelated) database migrations raise `NameError: uninitialized constant AutoIncrement::ActiveRecord::Base`. This makes the entire gem unusable.\r\n\r\nRuby 2.2.0\r\nRails 4.2.0\r\nauto_increment 1.1.0\r\n\r\n`rake db:migrate --trace` output:\r\n\r\n```\r\n** Invoke db:migrate (first_time)\r\n** Invoke environment (first_time)\r\n** Execute environment\r\n** Invoke db:load_config (first_time)\r\n** Execute db:load_config\r\n** Execute db:migrate\r\nrake aborted!\r\nNameError: uninitialized constant AutoIncrement::ActiveRecord::Base\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/schema_migration.rb:13:in `table_name'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/schema_migration.rb:21:in `table_exists?'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/schema_migration.rb:25:in `create_table'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:781:in `initialize_schema_migrations_table'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:922:in `initialize'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `new'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `up'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:798:in `migrate'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:137:in `migrate'\r\n/Users/kylecline/ticket_win/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `call'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `each'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `execute'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `each'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:75:in `run'\r\n/Users/kylecline/.rvm/rubies/ruby-2.2.0/bin/rake:33:in `<main>'\r\n```"}}