LoginSignup
6
2

More than 5 years have passed since last update.

Ruby2.5にバージョンアップしたらdeviseがエラった

Posted at

Ruby2.5だとdeviceがシンタックスエラー

SyntaxError (/usr/local/rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/devise-4.3.0/app/controllers/devise/sessions_controller.rb:5: syntax error, unexpected '{', expecting keyword_end
...ion only: [:create, :destroy] { request.env["devise.skip_tim...
...                              ^
/usr/local/rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/devise-4.3.0/app/controllers/devise/sessions_controller.rb:5: syntax error, unexpected '}', expecting keyword_end
..."devise.skip_timeout"] = true }
...                              ^):

app/controllers/front/users/sessions_controller.rb:1:in `<top (required)>'

解決策

以下のisuueをご確認ください。

Devise syntax error (Possibly ruby-2.5 related?)
https://github.com/plataformatec/devise/issues/4630

この記事はほぼ個人メモです。
Railsで複数案件の開発をしていて、「あれ? 前もこんなエラー出たなー」って思ったのでメモ。

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2