Migration Trouble

I’m having an issue with one migration. all other migrations work ok.

Here’s the output:
== 20140905145859 CreateMemberships: migrating

– create_table(:memberships)
-> 0.3010s
== 20140905145859 CreateMemberships: migrated (0.3011s)

But here’s what it looks like in rails c:
Loading development environment (Rails 4.0.5)
2.0.0-p481 :001 > Membership
=> Membership()

Here’s the content of the migration:
class CreateMemberships < ActiveRecord::Migration
def change
create_table :memberships do |t|
t.string :user_id

  t.timestamps
end

end
end

Any ideas why this one migration has problems?

On Thursday, 18 September 2014 19:52:05 UTC-4, Ruby-Forum.com User
wrote:

  t.string :user_id

  t.timestamps
end

end
end

Any ideas why this one migration has problems?

If you do Membership.first in the console, what happens?

Usually when this sort of weirdness happens to me, it’s because some
other
class/module in the app is getting named Membership, which makes a
real
mess.

–Matt J.

That was it! Thanks.