How do I debug my migrations using ruby-debug in rails 3?
running rake db:migrate does not seem to trigger any debugger command as in Rails 2. And rake db:migrate --debugger does not work either.
Thanks.
How do I debug my migrations using ruby-debug in rails 3?
running rake db:migrate does not seem to trigger any debugger command as in Rails 2. And rake db:migrate --debugger does not work either.
Thanks.
I was able to debug a migration by doing the following
Add ruby-debug to Gemfile
In the migration add
require 'ruby-debug'
and executedebugger
in the line you want to stop. For examplethen run
rake db:migrate
or any other db command. For example