Nil.to_sym when migrating?

For whatever reason I’m getting the following when attempting to run a

–rename_column(:listings, :listed_by, :agent_id)
rake aborted!
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.to_sym

The migration itself looks like this:
class CorrectColumnType < ActiveRecord::Migration
def self.up
rename_column :listings, :listed_by, :agent_id

def self.down
rename_column :listings, :agent_id, :listed_by

The table ‘listings’ and column ‘listed_by’ do exist and the code
makes use of it fine–I just want to rename that column and can’t.

Any ideas why?

the agent_id ? rerun with --trace

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs