2016-06-14 12 views
0

Warum es zeigt diesen Fehler, wenn ich versuche zu laufen rake db:migrate:nicht definierte Methode `to_sym‘ für {: limit => 30,: string => "Hinweis:": null => false}: Hash

undefined method `to_sym' for {:limit=>30, :string=>"Hint: ", :null=>false}:Hash 

Code:

def up 
    create_table :users do |t| 
      t.string "email", :limit => 50, :string => "Forgot password!", :null => false 
      t.column "password", :limit => 30, :string => "Hint: ", :null => false 
      :default 

      t.timestamps 
     end 
     end 

Antwort

1

diese Linie ändern .. muss möglicherweise

t.column "password", :limit => 30, :string => "Hint: ", :null => false 

von

t.string "password", :limit => 30, :string => "Hint: ", :null => false 
Verwandte Themen