Error message

Using Devise in Rails and creating a user registration function, an error occurs when new_user_registration_path is executed


SyntaxError (/Users/*******/projects/*******/app/views/devise/shared/_error_messages.html.slim:5: syntax error, unexpected ' : ', expecting') '
-count: resource.errors.count,

# routes.rb
Rails.application.routes.draw do
  devise_for: users
  resources: users
  resources: articles do
    resources: comments, only:: create
  root to: 'articles # index'

After installing devise, creating a login screen, and trying to create a new registration screen, the above error has occurred.

* The erb file is converted to slim.

If i have any reference articles or related information, please let me know.

  • Answer # 1

    The 4th line is not finished, but the 5th and 6th lines are ruby ​​program lines.
    -Since I think there was no continuation line function, it is regarded as another program sentence.
    It may be a lie because I haven't mastered slim
    1),, line feed, next-none 2) \ just before a new line. NEXT-NONE
    3) If it still doesn't work, give up on a long line