If you are using Rails you should probaly be using ActiveModel::SecurePassword instead of using bcrypt
ActiveModel::SecurePassword