NoMethodError in Signups#new (undefined method `email' for #<Signup id: nil, created_at: nil, updated_at: nil>)


I am getting an error:

undefined method 'email' for #<Signup id: nil, created_at: nil, updated_at: nil>

the line of code highlighted in the error message is:

<%= f.text_field :email %>

There is a previous thread with this issue ( ) but I have implemented the fix suggested (ensuring that the data type for email in the migration file is string instead of text and ensuring that the form input type is text_field). This does not fix the problem. Can anyone shed light on this.

My View file (new.html.erb)

        <!-- Your code here -->
        <%= form_for(@signup) do |f| %>  
  <div class="field"> 
    <%= f.label :signup %> 
    <%= f.text_area :email %> 
  <div class="actions"> 
    <%= f.submit "Sign Up" %> 
<% end %>

My migration file

class CreateSignups < ActiveRecord::Migration
  def change
    create_table :signups do |t|
		t.string :email

My Signup controller

class SignupsController < ApplicationController
  def new
  	@signup =


did you happen to add the email:? cause it's not in the stored migration file. try to run rake db:migrate