Skip to content

Instantly share code, notes, and snippets.

@Suave
Created July 7, 2014 12:33
Show Gist options
  • Save Suave/4e77e39f96a0ef1d2620 to your computer and use it in GitHub Desktop.
Save Suave/4e77e39f96a0ef1d2620 to your computer and use it in GitHub Desktop.
auto_migrations_rails4 work in rails4.1
diff --git a/lib/auto_migrations_rails4.rb b/lib/auto_migrations_rails4.rb
index 5195142..35fecf8 100644
--- a/lib/auto_migrations_rails4.rb
+++ b/lib/auto_migrations_rails4.rb
@@ -1,5 +1,6 @@
# load rake
-Dir[File.join(File.dirname(__FILE__),'tasks/**/*.rake')].each { |f| load f } if defined?(Rake)
+require 'rake'
+Dir[File.join(File.dirname(__FILE__),'tasks/**/*.rake')].each { |f| import f } if defined?(Rake)
module AutoMigrations
def self.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment