btelles/legacy_migrations

uninitialized constant LegacyMigrations::SourceIterators

bonkowski opened this issue · 3 comments

When adding gem 'legacy_migrations' to my Gemfile I get the following trace when i execute the rake -T --trace command.

(in /home/andre/Develop/sekretariat)
rake aborted!
uninitialized constant LegacyMigrations::SourceIterators
/usr/lib/ruby/gems/1.8/gems/legacy_migrations-0.3.5/lib/legacy_migrations.rb:200
/home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:64:in require' /home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:64:inrequire'
/home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:62:in each' /home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:62:inrequire'
/home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:51:in each' /home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:51:inrequire'
/home/andre/.gem/ruby/1.8/gems/bundler-1.0.0.rc.6/lib/bundler.rb:112:in require' /home/andre/Develop/sekretariat/config/application.rb:7 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in require' /home/andre/Develop/sekretariat/Rakefile:4 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:inload'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in raw_load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:inload_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:inload_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:inload'
/usr/bin/rake:19

Removing the gem from Gemfile, it runs as expected.

Hi Bonkowski,
Okay, I'll take a look at that when I get home tonight. Thanks for the heads up.

Hi Bonkowski,
I've released a minor patch (0.3.7) that should fix the problem. Basically the actual library wasn't explicitly requiring the source_iterators (clearly), so I just added the requires. Please let me know whether this fixes the problem or not. Also, note that I have not tested this with Rails 3...(since you're using a gemfile, my gut tells me you might be). If you encounter any problems, please let me know. :)
Cheers,
Bernie

Great! I have implemented the first step of the migration using a "home made" solution which works just fine. Later I'm going to add more migrations, and then I'll be looking into using legacy_migration again. Yes, I'm using Rail 3, and I can verify that the "rake -T" test that failed earlier now works.

Cheers,
André