tag:blogger.com,1999:blog-822738186956251465.post1830887695453926575..comments2023-11-09T00:23:18.101-05:00Comments on Brent's Tech Ramblings: Creating/deleting foreign keys during migrationsBrenthttp://www.blogger.com/profile/17023647333704400692noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-822738186956251465.post-84810215590135714442011-02-27T08:42:46.549-05:002011-02-27T08:42:46.549-05:00Fixed. The problem was:class MyMigration < Acti...Fixed. The problem was:<br><br>class MyMigration < ActiveRecord::Migration extend MigrationHelpers<br><br>instead of:<br><br>class MyMigration < ActiveRecord::Migration<br> extend MigrationHelpersAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-822738186956251465.post-5991901678745547892011-02-27T08:39:26.143-05:002011-02-27T08:39:26.143-05:00Same error here (Undefined method `Migration` for ...Same error here (Undefined method `Migration` for ActiveRecord:Module).<br><br>version? Rails 3Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-822738186956251465.post-11979831979283461702010-04-16T13:22:07.936-04:002010-04-16T13:22:07.936-04:00muthhus - I'm not really sure what would cause...muthhus - I'm not really sure what would cause that, it sounds like something is not correct with ActiveRecord. What version of Rails are you using?Brenthttp://www.blogger.com/profile/17023647333704400692noreply@blogger.comtag:blogger.com,1999:blog-822738186956251465.post-53255871900354501442010-04-16T07:22:42.142-04:002010-04-16T07:22:42.142-04:00Hi,Its nice to have such module. but when i was tr...Hi,<br><br>Its nice to have such module. but when i was trie i got following error:<br><br>** Invoke db:migrate (first_time)<br>** Invoke environment (first_time)<br>** Execute environment<br>** Execute db:migrate<br>rake aborted!<br>undefined method `Migration' for ActiveRecord:Module<br>./db/migrate//20100416111740_add_foreign_key_to_upload.rb:2<br>/home/shanmuga/upload/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:in `load'<br>/home/shanmuga/upload/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:in `load'<br>/home/shanmuga/upload/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'<br>/home/shanmuga/upload/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:in `load'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:454:in `migrations'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:188:in `inject'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:440:in `each'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:440:in `inject'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:440:in `migrations'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:406:in `migrate'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:357:in `up'<br>/home/shanmuga/upload/vendor/rails/activerecord/lib/active_record/migration.rb:340:in `migrate'<br>/home/shanmuga/upload/vendor/rails/railties/lib/tasks/databases.rake:99<br>/usr/lib/ruby/1.8/rake.rb:546:in `call'<br>/usr/lib/ruby/1.8/rake.rb:546:in `execute'<br>/usr/lib/ruby/1.8/rake.rb:541:in `each'<br>/usr/lib/ruby/1.8/rake.rb:541:in `execute'<br>/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'<br>/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'<br>/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'<br>/usr/lib/ruby/1.8/rake.rb:494:in `invoke'<br>/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'<br>/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'<br>/usr/lib/ruby/1.8/rake.rb:1909:in `each'<br>/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'<br>/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'<br>/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'<br>/usr/lib/ruby/1.8/rake.rb:1881:in `run'<br>/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'<br>/usr/lib/ruby/1.8/rake.rb:1878:in `run'<br>/usr/bin/rake:28<br><br><br>Would you please help me fix the issues;<br><br>Thanks<br><br>Rgdsmuthhusmuthhusnoreply@blogger.comtag:blogger.com,1999:blog-822738186956251465.post-54776651374895349862009-11-04T19:02:36.472-05:002009-11-04T19:02:36.472-05:00Good job! It's excellent for me :) Regards!Good job! It's excellent for me :) Regards!Hugohttp://www.blogger.com/profile/06507636919157357214noreply@blogger.com