![](/img/trans.png)
[英]syntax error, unexpected '\n', expecting :: or '[' or '.'
[英]syntax error, unexpected '\n', expecting =>
我在登錄頁面上實現了LinkedIn的OmniAuth,但出現此錯誤:
SyntaxError
/app/models/user.rb:9: syntax error, unexpected '\n', expecting =>
它正在查看的代碼是這樣的:
class User < ActiveRecord::Base
attr_accessor :email, :password, :password_confirmation
VALID_EMAIL_REGEX = /([\w+.]+)@[a-z0-9\-.]+\.[a-z]+/i
validates :email, presence: true,
format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
validates :password, presence: true, length: { minimum: 6 }
validates :password_confirmation, presence: true
devise :rememberable, :omniauthable, :omniauth_providers => [:linkedin], :trackable
end
有什么建議嗎?
嘗試重新排序
devise :rememberable, :omniauthable, :trackable, :omniauth_providers => [:linkedin]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.