0

For some reason I am suddenly unable to generate a migration from my rails console and am unsure how to interpret the error. I believe it has to do with a problem from when I tried to remove refinery cms early on.

Here is an example of the error:

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>'

I would appreciate it if someone could explain how to solve this issue or interpret the error. Refinery cms installed a rails engine and the tables still exist in my database. I am unable to remove them as well as generate a basic migration.

b1akely
  • 37
  • 1
  • 7

1 Answers1

2

Run rails g migration add_title_to_pin title:string from the command line, not from within the Rails console or IRB.

infused
  • 24,000
  • 13
  • 68
  • 78