Note that there are some explanatory texts on larger screens.

plurals
  1. POundefined method `zero?' for nil:NilClass on Devise
    primarykey
    data
    text
    <p>I'm installing Devise and I'm getting a undefined method `zero?' for nil:NilClass when trying to register a new user. Routing seams ok, as other pages such as sign in, sign up, lost password is showing up.</p> <p>The error message:</p> <pre><code>NoMethodError in Devise::RegistrationsController#create undefined method `zero?' for nil:NilClass </code></pre> <p>My Class User is as follows:</p> <pre><code> class User &lt; ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable #, :encryptable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :password_salt # attr_accessible :title, :body end </code></pre> <p>The migration is running OK as:</p> <pre><code> class DeviseCreateUsers &lt; ActiveRecord::Migration def change create_table(:users) do |t| ## Database authenticatable t.string :email, :null =&gt; false, :default =&gt; "" t.string :encrypted_password, :null =&gt; false, :default =&gt; "" ## Recoverable t.string :reset_password_token t.datetime :reset_password_sent_at ## Rememberable t.datetime :remember_created_at ## Trackable t.integer :sign_in_count, :default =&gt; 0 t.datetime :current_sign_in_at t.datetime :last_sign_in_at t.string :current_sign_in_ip t.string :last_sign_in_ip ## Confirmable t.string :confirmation_token t.datetime :confirmed_at t.datetime :confirmation_sent_at t.string :unconfirmed_email # Only if using reconfirmable ## Lockable t.integer :failed_attempts, :default =&gt; 0 # Only if lock strategy is :failed_attempts t.string :unlock_token # Only if unlock strategy is :email or :both t.datetime :locked_at ## Token authenticatable t.string :authentication_token t.string :password_salt t.timestamps end add_index :users, :email, :unique =&gt; true add_index :users, :reset_password_token, :unique =&gt; true add_index :users, :confirmation_token, :unique =&gt; true add_index :users, :unlock_token, :unique =&gt; true add_index :users, :authentication_token, :unique =&gt; true end end </code></pre> <p>Parameters:</p> <pre><code>{"utf8"=&gt;"✓", "authenticity_token"=&gt;"MNwIeldQzcBbakbcLkbcIlNYiKQ72F3nJyqHOsDdRoM=", "user"=&gt;{"email"=&gt;"email@example.com", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]"}, "commit"=&gt;"Sign up", "locale"=&gt;"en"} </code></pre> <p>Devise Version: 2.1.2</p> <p>Ruby version:</p> <pre><code>ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] </code></pre> <p>Rails version:</p> <pre><code>Rails 3.2.13 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload