Skip to content

Commit

Permalink
Fixes #12199 - rails 4 migration errors
Browse files Browse the repository at this point in the history
There are actually two parts to the issue of not being able to migrate
with this branch. The first is
https://gist.github.com/eLobato/0f5db50b5c93cc6c277c and can be
temporarily fixed with rails/sass-rails#136 (comment) I am not sure of a
long term fix for that atm.

Once that is patched, this error
https://gist.github.com/johnpmitsch/96e5ba3629890931193a happens on a
migration. This will fix that error by changing the Migrator class
initializer arguments which have changed from rails 3 to rails 4
  • Loading branch information
John Mitsch authored and dLobatog committed Oct 28, 2015
1 parent 51eb35c commit cc1f8ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/foreman/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def role(name, permissions)
end

def pending_migrations
migrations = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations_paths).pending_migrations
migrations = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations(ActiveRecord::Migrator.migrations_paths)).pending_migrations
migrations.size > 0
end

Expand Down

0 comments on commit cc1f8ca

Please sign in to comment.