Your user is failing to create because the email is failing the format validation.
It's interesting though that it reports this error as if the uniqueness is the thing causing the problem. You have shown your user table to be empty so no way it can fail a uniqueness constraint.
A couple of things to try:
1) in the console try this:
user = User.new(name: "Mr Rush", email: "rush@example.com", password: "fubar", password_confirmation: "fubar")
user.valid? <--- should give you false
user.errors <--- should tell you the format of the email is incorrect
When I combine presence
with anything else in a validator I always allow the value to be blank in the following validations; there is no point in validating the format or uniquessness of something if it is mandatory but missing. i.e.
validates :email, presence: true, format: {with: VALID_EMAIL_REGEX, allow_blank: true}, uniqueness: { case_sensitive: false, allow_blank: true }
Doing this may or may not change what it thinks the real validation failure is.
2) fix the regex for email validation. Validating email address by regex is a bit controversial, but you should find something like this will work:
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
You can always try out the regex validation using a website like Rubular.