无法在 rails 控制台中生成迁移

Can't generate migration in rails console

出于某种原因,我突然无法从我的 rails 控制台生成迁移,并且不确定如何解释该错误。我相信这与我早期尝试删除 refinery cms 时出现的问题有关。

错误示例如下:

2.1.3 :004 > rails g migration drop_refinery_images
NameError: undefined local variable or method `drop_refinery_images' for main:Object
from (irb):4
from /Users/user/.rvm/gems/ruby-2.1.3@global/gems/railties-4.1.6/lib/rails/commands/console.rb:90:in `start'
from /Users/user/.rvm/gems/ruby-2.1.3@global/gems/railties-4.1.6/lib/rails/commands/console.rb:9:in `start'
from /Users/user/.rvm/gems/ruby-2.1.3@global/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:69:in `console'
from /Users/user/.rvm/gems/ruby-2.1.3@global/gems/railties-    4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/user/.rvm/gems/ruby-2.1.3@global/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'

如果有人能解释如何解决这个问题或解释错误,我将不胜感激。 Refinery cms 安装了一个 rails 引擎,这些表仍然存在于我的数据库中。我无法删除它们,也无法生成基本迁移。

运行 rails g migration add_title_to_pin title:string 来自命令行,而不是来自 Rails 控制台或 IRB。