I set up Devise and am able to create a profile. When I create the profiles and try to log in, I get an error message that I have not confirmed my account,
I never got the email which I am supposed to confirm my own account. Did I go wrong in selecting such an option, or not enabling Devise to email me?
Here is the migration I used to make it:
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t|
t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
t.confirmable
t.encryptable
t.column "first_name", :string
t.column "last_name", :string
t.column "organization_name", :string
t.timestamps
end
add_index :users, :email, :unique => true
end
def self.down
drop_table :users
end
end
In development mode, you have to add this line to
config/environments/development.rbconfig.action_mailer.default_url_options = { :host => 'localhost:3000' }Then, check your server logs to see the mail. You should find something like that:
You also need to put this line in
config/initializers/devise.rbIf you REALLY don’t have this mail in your logs, you can still validate your account by taking the value of
confirmation_tokenin your DB and go to this linkAnd that should do the trick.
Cheers