5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rails generate devise:install でエラー (Rails 5.1, ruby 2.4)

Last updated at Posted at 2017-05-06

deviseを使うときに躓いたのでメモ:pencil2:
Gemfileに以下を記述し、bundle installを実行

gem 'devise'

次に、rails generate devise:installすると以下のエラー

/home/vagrant/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'devise'.
Gem Load Error is: undefined method `alias_method_chain' for ActionDispatch::Routing::RouteSet:Class
Did you mean?  alias_method
Backtrace for gem load error is:

Gemfileの記述を以下に変更で解決

gem 'devise', git: 'https://github.com/plataformatec/devise.git', branch: 'master'

###参照

5
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
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?