title: Undefined local variable or method 'rolify'
body: <p>In my Rails project, I am trying to set up user authentication and user roles using the following Gems: </p>
  
  <ul>
  <li>Devise</li>
  <li>Cancan</li>
  <li>Rolify</li>
  </ul>
  
  <p>I had Devise up and working perfectly, but then when I went to set up CanCan and Rolify, I get this error in the <strong>browser</strong>: </p>
  
  <pre><code>NameError in Home#index
  
  Showing C:/Sites/JustManage/app/views/devise/menu/_registration_items.html.erb where line #1 raised:
  
  undefined local variable or method `rolify' for #&lt;Class:0x3f48660&gt;
  Extracted source (around line #1):
  
  1: &lt;% if user_signed_in? %&gt;
  2: 
  3:   &lt;li&gt;
  4:      &lt;%= link_to('Edit registration', edit_user_registration_path) %&gt;
  Trace of template inclusion: app/views/layouts/application.html.erb
  
  Rails.root: C:/Sites/JustManage
  </code></pre>
  
  <p><strong>user.rb</strong></p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    rolify
  
    # Include default devise modules. Others available are:
    # :token_authenticatable, :confirmable,
    # :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :email, :password, :password_confirmation, :remember_me, :subdomain, :first_name, :last_name
  
    # Make sure certain attributes are unique
    validates_uniqueness_of :email, :case_sensitive =&gt; false
  end
  </code></pre>
  
  <p><strong>role.rb</strong></p>
  
  <pre><code>class Role &lt; ActiveRecord::Base
    has_and_belongs_to_many :users, :join_table =&gt; :users_roles
    belongs_to :resource, :polymorphic =&gt; true
  
    scopify
  end
  </code></pre>
  
  <p><strong>rolify.rb</strong></p>
  
  <pre><code>Rolify.configure do |config|
    config.use_dynamic_shortcuts
  end
  </code></pre>
  
  <p>Let me know if you need me to post contents from any of my other files!</p>