Developer setup - db:migrate failed


#1

Hi

I need install manageiq (developer setup) on Centos 7.1 by this topic:

(http://manageiq.org/docs/guides/developer_setup.html)

But I have next error:

== 20150224192447 AddProviderIdToEms: migrated (0.0007s) ======================

rails aborted!
GoodMigrations::LoadError: Rails attempted to auto-load:

/home/miqbuilder/manageiq/app/models/mixins/uuid_mixin.rb

Which is in your project’s app/ directory. The good_migrations
gem was designed to prevent this, because migrations are intended
to be immutable and safe-to-run for the life of your project, but
code in app/ is liable to change at any time.

The most common reason for this error is that you may be referencing an
ActiveRecord model inside the migration in order to use the ActiveRecord API
to implement a data migration by querying and updating objects.

For instance, if you want to access a model “User” in your migration, it’s safer
to redefine the class inside the migration instead, like this:

class MakeUsersOlder < ActiveRecord::Migration
class User < ActiveRecord::Base
# Define whatever you need on the User beyond what AR adds automatically
end

def up
User.find_each do |user|
user.update!(:age => user.age + 1)
end
end

def down
#…
end
end

For more information, visit:

https://github.com/testdouble/good-migrations

/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/good_migrations-0.0.2/tasks/good_migrations.rake:11:in load_file' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:375:inblock in require_or_load’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:37:in block in load_interlock' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies/interlock.rb:12:inblock in loading’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/concurrency/share_lock.rb:117:in exclusive' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies/interlock.rb:11:inloading’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:37:in load_interlock' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:358:inrequire_or_load’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:511:in load_missing_constant' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:203:inconst_missing’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:543:in load_missing_constant' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:203:inconst_missing’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:543:in load_missing_constant' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:203:inconst_missing’
/home/miqbuilder/manageiq/db/migrate/20150224192716_migrate_configuration_manager_to_ems.rb:3:in <class:ExtManagementSystem>' /home/miqbuilder/manageiq/db/migrate/20150224192716_migrate_configuration_manager_to_ems.rb:2:inclass:MigrateConfigurationManagerToEms
/home/miqbuilder/manageiq/db/migrate/20150224192716_migrate_configuration_manager_to_ems.rb:1:in <top (required)>' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:inrequire’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in block in require' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:inload_dependency’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in require' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:959:inload_migration’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:955:in migration' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:950:indisable_ddl_transaction’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1286:in use_transaction?' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1278:inddl_transaction’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1210:in execute_migration_in_transaction' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1183:inblock in migrate_without_lock’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1182:in each' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1182:inmigrate_without_lock’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1131:in block in migrate' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1298:inwith_advisory_lock’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1131:in migrate' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:1005:inup’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/migration.rb:983:in migrate' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/tasks/database_tasks.rb:161:inmigrate’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.0.1/lib/active_record/railties/databases.rake:58:in block (2 levels) in <top (required)>' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:13:inblock in run_rake_task’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in run_rake_task' /home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:inrun_command!’
/home/miqbuilder/.rvm/gems/ruby-2.3.3/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in <top (required)>' /home/miqbuilder/manageiq/bin/rails:4:inrequire’
/home/miqbuilder/manageiq/bin/rails:4:in `'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

== Command ["/home/miqbuilder/manageiq/bin/rails db:migrate"] failed ==

What I do wrong?

P.S. I was note my step, looks attached file.miq_dev_install (1.5 KB)


#2

A fix is in the works here. GOOD_MIGRATIONS=skip bin/setup or bin/update is a good workaround for now.